timeconstants

    1.0.1 • Public • Published

    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

    2

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar