mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
;dev: update doctests for weekly headings change [#2204]
This commit is contained in:
parent
a734ba5026
commit
6c47fa034a
@ -212,7 +212,7 @@ spansSpan spans = DateSpan (spanStartDate =<< headMay spans) (spanEndDate =<< la
|
||||
-- >>> t (Months 2) 2008 01 01 2008 04 01
|
||||
-- [DateSpan 2008-01-01..2008-02-29,DateSpan 2008-03-01..2008-04-30]
|
||||
-- >>> t (Weeks 1) 2008 01 01 2008 01 15
|
||||
-- [DateSpan 2007-12-31W01,DateSpan 2008-01-07W02,DateSpan 2008-01-14W03]
|
||||
-- [DateSpan 2007-W01,DateSpan 2008-W02,DateSpan 2008-W03]
|
||||
-- >>> t (Weeks 2) 2008 01 01 2008 01 15
|
||||
-- [DateSpan 2007-12-31..2008-01-13,DateSpan 2008-01-14..2008-01-27]
|
||||
-- >>> t (DayOfMonth 2) 2008 01 01 2008 04 01
|
||||
|
@ -173,7 +173,7 @@ periodTextWidth = periodTextWidth' . simplifyPeriod
|
||||
-- | Render a period as a compact display string suitable for user output.
|
||||
--
|
||||
-- >>> showPeriod (WeekPeriod (fromGregorian 2016 7 25))
|
||||
-- "2016-07-25W30"
|
||||
-- "2016-W30"
|
||||
showPeriod :: Period -> Text
|
||||
showPeriod (DayPeriod b) = T.pack $ formatTime defaultTimeLocale "%F" b -- DATE
|
||||
showPeriod (WeekPeriod b) = T.pack $ formatTime defaultTimeLocale "%0Y-W%V" b -- YYYY-Www
|
||||
|
Loading…
Reference in New Issue
Block a user