From 6c47fa034ae4d7eb27986a8a3bc770fc549d1f71 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 25 Jun 2024 18:36:43 +0100 Subject: [PATCH] ;dev: update doctests for weekly headings change [#2204] --- hledger-lib/Hledger/Data/Dates.hs | 2 +- hledger-lib/Hledger/Data/Period.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hledger-lib/Hledger/Data/Dates.hs b/hledger-lib/Hledger/Data/Dates.hs index 0e9a411ca..15630e814 100644 --- a/hledger-lib/Hledger/Data/Dates.hs +++ b/hledger-lib/Hledger/Data/Dates.hs @@ -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 diff --git a/hledger-lib/Hledger/Data/Period.hs b/hledger-lib/Hledger/Data/Period.hs index cbedafdfc..6077ac5e1 100644 --- a/hledger-lib/Hledger/Data/Period.hs +++ b/hledger-lib/Hledger/Data/Period.hs @@ -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