Nylon Pendulum Movement

    @frontierjs/datetime-kit

    0.0.5 • Public • Published

    Date Basics:

    const d = new Date();
    
    // Standard
    console.log('ISOString', d.toISOString())
    console.log('JSON', d.toJSON())
    console.log('UTCString', d.toUTCString())
    
    //
    console.log('String', d.toString())
    console.log('DateString', d.toDateString())
    console.log('TimeString', d.toTimeString())
    
    //
    console.log('LocaleString', d.toLocaleString())
    console.log('LocaleDateString', d.toLocaleDateString())
    console.log('LocalTimeString', d.toLocaleTimeString())

    datetime-kit

    import {format, relativeTo, relativeToNow} from '@frontierjs/datetime-kit'
    
    Date.prototype.format = function (formatPattern, options) {
       return format(this, formatPattern, options)
    }
    
    Date.prototype.relativeTo = function (dateTo, formatPattern, options) {
       return relativeTo(this, dateTo, formatPattern)
    }
    
    Date.prototype.relativeToNow = function (formatPattern, options) {
       return relativeToNow(this, new Date(), formatPattern, options)
    }

    Keywords

    none

    Install

    npm i @frontierjs/datetime-kit

    DownloadsWeekly Downloads

    22

    Version

    0.0.5

    License

    ISC

    Unpacked Size

    19 kB

    Total Files

    16

    Last publish

    Collaborators

    • jdkdev