JSPM

date-fns

0.5.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 34172229
  • Score
    100M100P100Q226429F

Date helpers

Package Exports

  • date-fns/package.json
  • date-fns/src/add_days
  • date-fns/src/each_day
  • date-fns/src/end_of_week
  • date-fns/src/is_today
  • date-fns/src/is_weekend
  • date-fns/src/start_of_day
  • date-fns/src/start_of_month
  • date-fns/src/start_of_week
  • date-fns/src/sub_days

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 (date-fns) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

date-fns

Date helpers in function-per-file style.

API

Code is fully documented, checkout source for reference.

  • isWeekend - is passed date is weekend?
  • isToday - is passed date is today?
  • startOfDay - returns start of a day for passed date
  • endOfDay - returns end of a day for passed date
  • startOfWeek - returns start of a week for passed date
  • endOfWeek - returns end of a week for passed date
  • startOfMonth - returns start of a month for passed date
  • endOfMonth - returns end of a month for passed date
  • eachDay - returns array of dates within specified range
  • addDays - add specified number of days to passed date
  • subDays - substract specified number of days from passed date