Dennis Tanaka

Software Developer

BlogNotesProfile

    Cheat Sheets

  • Command Line
  • Bash Scripting
  • Curl
  • Package Management
  • Version Management
  • Git
  • Tools

  • Toolbox
  • Virtualization
  • Visual Studio Code
  • Vim
  • Boilerplates
  • Hosting
  • Docker

  • Basics
  • Cheat Sheet
  • Compose
  • Guidelines

  • APIs
  • CSS
  • JavaScript

  • Concepts
  • Date & Time
  • Formatting
  • CSS

  • Sass
  • Bootstrap
  • Databases

  • MySQL
menu NOTES INDEX

    Cheat Sheets

  • Command Line
  • Bash Scripting
  • Curl
  • Package Management
  • Version Management
  • Git
  • Tools

  • Toolbox
  • Virtualization
  • Visual Studio Code
  • Vim
  • Boilerplates
  • Hosting
  • Docker

  • Basics
  • Cheat Sheet
  • Compose
  • Guidelines

  • APIs
  • CSS
  • JavaScript

  • Concepts
  • Date & Time
  • Formatting
  • CSS

  • Sass
  • Bootstrap
  • Databases

  • MySQL

JavaScript - Date & Time

Table of Contents

  • Time Difference - Using Moment.js

Time Difference - Using Moment.js

// example of difference in seconds
const currentTime = moment();
const diff = currentTime.diff(startTime, 'seconds');

Source: https://momentjs.com/docs/#/displaying/difference/

Dennis Tanaka

  • Dennis Tanaka
  • me@dennistanaka.com
  • dennistanaka
  • dennistanaka
  • dennistanaka

Seasoned IT professional with experience in systems analysis and software development. Most recently, I've worked with Golang, Ruby on Rails and Vue in terms of programming tools. I had also the opportunity to experience technologies such as Serverless Computing and Kubernetes. My current goals includes improving my management skills and learning more about DevOps and SRE.