Skip to content

zuulinc/datejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

datejs

Date utility initially used for inkincardine.com

datejs.isThisWeek(target, offset) ⇒ Boolean

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.

datejs.getStartOfWeek(date) ⇒ Date

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.

datejs.isNextWeek(target) ⇒ Boolean

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

datejs.isToday(date) ⇒ Boolean

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

datejs.isTomorrow(date) ⇒ Boolean

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

datejs.isNowBetween(left, right) ⇒ Boolean

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

datejs.format(date, format) ⇒ String

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

About

Date utility initially used for inkincardine.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published