@ff0000-ad-tech/ad-dates
v5.0.5
Published
[![npm (tag)](https://img.shields.io/npm/v/@ff0000-ad-tech%2Fad-dates.svg?style=flat-square)](https://www.npmjs.com/package/@ff0000-ad-tech%2Fad-dates) [![GitHub issues](https://img.shields.io/github/issues/ff0000-ad-tech/ad-dates.svg?style=flat-square)](
Downloads
35
Readme
RED Interactive Agency - Ad Technology
ad-dates
A lightweight package for handling dates created for use in digital ads where file weight limits are strict.
API
DateFormatter
- .setLanguage()
- .addLanguage()
- .getLabels() ⇒ TzDate | Date
- .getNumericSuffixFor() ⇒ String
- .format() ⇒ String
DateManager
- .init()
- .getNow() ⇒ TzDate
DateSchedule
- new DateSchedule(arg)
- .target : TzDate
- .current : object
- .currentDate : TzDate
- .currentLabel : String
- .currentIndex : Number
- .next : object
- .nextDate : TzDate
- .nextLabel : String
- .nextIndex : Number
- .isLive : Boolean
- .isComplete : Boolean
- .addDate(tzDate, label, callback)
- .print() ⇒
- .getDates() ⇒ Array
DateUtils
- .getTimeDifference() ⇒ Object
- .adjust() ⇒ TzDate | Date
- .isPast(date, context) ⇒ boolean
RecurringSchedule
- new RecurringSchedule()
- .currentSchedule : object
- .current : object
- .currentDate : TzDate
- .currentLabel : String
- .print()
Timezone
- .get() ⇒ string
TzDate
- new TzDate()
- .outputTimezone : object | string | number
- .clone() ⇒ TzDate
- .getHoursIn() ⇒ number
- .format() ⇒ String
- .getIn() ⇒ TzDate
- .print() ⇒ string
- .toFullDateTime() ⇒ string
- .toSimpleDate() ⇒ string
- .toDate() ⇒ string
- .toDateTime() ⇒ string
- .toSimpleDateTime() ⇒ string
- .toTime() ⇒ string
- .toSimpleTime() ⇒ string
- .toMeridiem() ⇒ string
- .toShortestTime() ⇒ string