justinmimbs/elm-date-extra/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Date.Extract

This module provides additional extractions to those available in the core Date library.

monthNumber : Date -> Int

Extract the month number of a date. Given the date 23 June 1990 at 11:45 a.m. this returns the integer 6.

quarter : Date -> Int

Extract the quarter of a date. Given the date 23 June 1990 at 11:45 a.m. this returns the integer 2.

ordinalDay : Date -> Int

Extract the ordinal day of a date. Given the date 23 June 1990 at 11:45 a.m. this returns the integer 174.

fractionalDay : Date -> Float

Extract the fractional day of a date. Given the date 23 June 1990 at 11:45 a.m. this returns the float 0.4895833333333333.

weekdayNumber : Date -> Int

Extract the weekday number (beginning at 1 for Monday) of a date. Given the date 23 June 1990 at 11:45 a.m. this returns the integer 6.

weekNumber : Date -> Int

Extract the week number of a date. Given the date 23 June 1990 at 11:45 a.m. this returns the integer 25.

weekYear : Date -> Int

Extract the week-numbering year of a date. Given the date 23 June 1990 at 11:45 a.m. this returns the integer 1990.

offsetFromUtc : Date -> Int

Extract the local offset from UTC time, in minutes, of a date. Given a date with a local offset of UTC-05:00 this returns the integer -300.