Date

Module for Date-FP

See:

Example

rps install date

Actions

add-date :: String → Number → Date → Date

Returns:
Date
See:
Example
add-date 'milliseconds' 1 $date

clone-date :: Date → Date

Returns:
Date
See:
Example
clone-date $date

date-convert-to :: String → Date → Number

See:
Example
date-convert-to 'hours' $date

date-diff :: String → Date → Date → Number

See:
Example
date-diff 'months' $date1 $date2

date-equals :: Date → Date → Boolean

See:
Example
date-equals $date1 $date2

date-format :: String → Date → String

See:
Example
date-format $date1 "DD/MM/YY"

get :: String → Date → Date

See:
Example
date-get 'hours' $date

date-is-valid :: Date → Boolean

See:
Example
date-is-valid $date

date-of :: [Number] → Date

Parameters:
Name Type Description
array Array
Returns:
Date
See:
Example
date-of [1970, 0, 1]

from-time :: Number → Date

Parameters:
Name Type Description
array Array
Returns:
Date
See:
Example
from-time 1488374854000

is-leap-year :: Date → Boolean

See:
Example
is-leap-year $date

max-date :: [Date] → Date

See:
Example
max-date [$date1 , $date2]

min-date :: [Date] → Date

See:
Example
min-date [$date1 , $date2]

parse-date :: String → String → Date

See:
Example
parse-date "MMM Do, YYYY" "January 1st, 2015"

set-date :: String → Number → Date → Date

See:
Example
set-date "hours" 13 $date

subtract-date :: String → Number → Date → Date

See:
Example
subtract-date "hours" 1 $date

unix-time :: Date → Number

See:
Example
unix-time $date
-->