Noodles, Poodles and More!

    date-round

    0.0.1 • Public • Published

    Round/floor/ceil dates to day/week/month/year boundaries

    Usage

    var DateRound = require('date-round');
    
    // Round to the nearest day
    DateRound.round(Date.now());
    
    // Midnight
    DateRound.floor(Date.now());
    
    // Next week
    DateRound.ceil(Date.now(), 'week');
    
    // Next month
    DateRound.ceil(Date.now(), 'month');
    
    // Next year
    DateRound.ceil(Date.now(), 'year');
    

    Install

    npm i date-round

    DownloadsWeekly Downloads

    75

    Version

    0.0.1

    License

    Apache-2.0

    Last publish

    Collaborators

    • djsauble