JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4788
  • Score
    100M100P100Q118524F
  • License ISC

XMPP Date and Time Profiles for JavaScript

Package Exports

  • @xmpp/time

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@xmpp/time) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

time

XMPP Date and Time Profiles for JavaScript

Install

npm install @xmpp/time

Usage

const time = require('@xmpp/time')

time.date() // '2016-11-18'
time.time() // '20:45:30.221Z'
time.datetime() // '2016-11-18T20:45:53.513Z'
time.offset() // '-1:00'

// each method accepts an optional date or string argument

time.datetime('05 October 2011 14:48 UTC') // '2011-10-05T14:48:00.000Z'
time.datetime(new Date('05 October 2011 14:48 UTC')) // '2011-10-05T14:48:00.000Z'

References