module Data.HodaTime.CalendarDateTime
(
CalendarDateTime
,IsCalendar
,HasDate
,DoW
,MoY
,day
,month
,year
,dayOfWeek
,next
,previous
,yearMonthDay
,on
,at
,atStartOfDay
,withCalendar
)
where
import Data.HodaTime.CalendarDateTime.Internal
import Data.HodaTime.LocalTime.Internal (midnight)
on :: LocalTime -> CalendarDate cal -> CalendarDateTime cal
on :: forall cal. LocalTime -> CalendarDate cal -> CalendarDateTime cal
on = (CalendarDate cal -> LocalTime -> CalendarDateTime cal)
-> LocalTime -> CalendarDate cal -> CalendarDateTime cal
forall a b c. (a -> b -> c) -> b -> a -> c
flip CalendarDate cal -> LocalTime -> CalendarDateTime cal
forall calendar.
Date calendar -> LocalTime -> CalendarDateTime calendar
CalendarDateTime
atStartOfDay :: CalendarDate cal -> CalendarDateTime cal
atStartOfDay :: forall cal. CalendarDate cal -> CalendarDateTime cal
atStartOfDay = (CalendarDate cal -> LocalTime -> CalendarDateTime cal)
-> LocalTime -> CalendarDate cal -> CalendarDateTime cal
forall a b c. (a -> b -> c) -> b -> a -> c
flip CalendarDate cal -> LocalTime -> CalendarDateTime cal
forall calendar.
Date calendar -> LocalTime -> CalendarDateTime calendar
at LocalTime
midnight
withCalendar :: (IsCalendarDateTime a, IsCalendarDateTime b) => CalendarDateTime a -> CalendarDateTime b
withCalendar :: forall a b.
(IsCalendarDateTime a, IsCalendarDateTime b) =>
CalendarDateTime a -> CalendarDateTime b
withCalendar = Instant -> CalendarDateTime b
forall cal.
IsCalendarDateTime cal =>
Instant -> CalendarDateTime cal
fromAdjustedInstant (Instant -> CalendarDateTime b)
-> (CalendarDateTime a -> Instant)
-> CalendarDateTime a
-> CalendarDateTime b
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CalendarDateTime a -> Instant
forall cal.
IsCalendarDateTime cal =>
CalendarDateTime cal -> Instant
toUnadjustedInstant