Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data.Thyme.Calendar.WeekDate
Description
Various Week Date formats
- type Year = Int
- type WeekOfYear = Int
- type DayOfWeek = Int
- data WeekDate = WeekDate {}
- weekDate :: Iso' Day WeekDate
- weekDateValid :: WeekDate -> Maybe Day
- showWeekDate :: Day -> String
- data SundayWeek = SundayWeek {}
- sundayWeek :: Iso' Day SundayWeek
- sundayWeekValid :: SundayWeek -> Maybe Day
- data MondayWeek = MondayWeek {}
- mondayWeek :: Iso' Day MondayWeek
- mondayWeekValid :: MondayWeek -> Maybe Day
- _wdYear :: Lens' WeekDate Year
- _wdWeek :: Lens' WeekDate WeekOfYear
- _wdDay :: Lens' WeekDate DayOfWeek
- _swYear :: Lens' SundayWeek Year
- _swWeek :: Lens' SundayWeek WeekOfYear
- _swDay :: Lens' SundayWeek DayOfWeek
- _mwYear :: Lens' MondayWeek Year
- _mwWeek :: Lens' MondayWeek WeekOfYear
- _mwDay :: Lens' MondayWeek DayOfWeek
Documentation
type WeekOfYear = Int Source #
ISO 8601 Week Date
Weeks numbered 01 to 53, where week 01 is the first week that has at least 4 days in the new year. Days before week 01 are considered to belong to the previous year.
Instances
showWeekDate :: Day -> String Source #
Weeks starting Sunday
data SundayWeek Source #
Weeks numbered from 0 to 53, starting with the first Sunday of the year
as the first day of week 1. The last week of a given year and week 0 of
the next both refer to the same week, but not all DayOfWeek
are valid.
Year
coincides with that of gregorian
.
Constructors
SundayWeek | |
Instances
sundayWeek :: Iso' Day SundayWeek Source #
sundayWeekValid :: SundayWeek -> Maybe Day Source #
Weeks starting Monday
data MondayWeek Source #
Weeks numbered from 0 to 53, starting with the first Monday of the year
as the first day of week 1. The last week of a given year and week 0 of
the next both refer to the same week, but not all DayOfWeek
are valid.
Year
coincides with that of gregorian
.
Constructors
MondayWeek | |
Instances
mondayWeek :: Iso' Day MondayWeek Source #
mondayWeekValid :: MondayWeek -> Maybe Day Source #
Lenses
_wdWeek :: Lens' WeekDate WeekOfYear Source #
_swYear :: Lens' SundayWeek Year Source #
_swWeek :: Lens' SundayWeek WeekOfYear Source #
_swDay :: Lens' SundayWeek DayOfWeek Source #
_mwYear :: Lens' MondayWeek Year Source #
_mwWeek :: Lens' MondayWeek WeekOfYear Source #
_mwDay :: Lens' MondayWeek DayOfWeek Source #