Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    timeconstantspublic

    timetimeconstants

    Time timeconstants for JavaScript, ex. hour, minute, second, etc.

    The following are available:

    yearApprox (= 365.25 days)
    monthApprox (= 1/12th of a year)
    week
    day
    hour
    minute
    second
    ms
    

    Usage

    var timeconstants = require('timeconstants');
     
    var tenMilliseconds = 10 * timeconstants.ms;
    var twoMinuteAndFiveSeconds = 2 * timeconstants.minute + 5 * timeconstants.second;
    var twelveHours = 12 * timeconstants.hour;
    var oneDay = timeconstants.day;
    var oneWeek = timeconstants.week;
     
    // = 1/12th of a year
    timeconstants.monthApprox;
     
    // = 365.25 days
    timeconstants.yearApprox;

    install

    npm i timeconstants

    Downloadsweekly downloads

    392

    version

    1.0.1

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar