Date utility initially used for inkincardine.com
- datejs
- .isThisWeek(target, offset) ⇒
Boolean
- .getStartOfWeek(date) ⇒
Date
- .isNextWeek(target) ⇒
Boolean
- .isToday(date) ⇒
Boolean
- .isTomorrow(date) ⇒
Boolean
- .isNowBetween(left, right) ⇒
Boolean
- .format(date, format) ⇒
String
- .isThisWeek(target, offset) ⇒
Checks if a date is in this week
Kind: static method of datejs
Param | Type | Description |
---|---|---|
target | Date |
date we're looking for |
offset | Int |
day offset, used with the isNextWeek, so that we can use the same logic, but just add 7 to the equations. |
Gets the first day of the week.
Kind: static method of datejs
Returns: Date
- first day of the week
Param | Type | Description |
---|---|---|
date | Date |
a target date, or if not suplied, it'll be today's date. |
Is a specified date in next week
Kind: static method of datejs
Returns: Boolean
- if it is or isnt in next week
Param | Type | Description |
---|---|---|
target | Date |
date that we're comparing |
Is a supplied date today?
Kind: static method of datejs
Returns: Boolean
- it is or it isnt
Param | Type | Description |
---|---|---|
date | Date |
the target date |
Is a supplied date tomorrow?
Kind: static method of datejs
Returns: Boolean
- it either is or isnt tomorrow
Param | Type | Description |
---|---|---|
date | Date |
is the date tomorrow |
Is the current time between two dates?
Kind: static method of datejs
Returns: Boolean
- if it's in the range or not.
Param | Type | Description |
---|---|---|
left | Date |
start of date range |
right | Date |
end of date range |
Simple date formatting
Kind: static method of datejs
Returns: String
- formatted date.
Param | Type | Description |
---|---|---|
date | Date |
date we're going to format |
format | String |
formatting string |