Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35583

Re: Parsing calendar weeks to LocalDates with DateTimeFormatter

From Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Parsing calendar weeks to LocalDates with DateTimeFormatter
Date 2016-09-09 22:46 +0100
Organization Home
Message-ID <XSD8BfGz2y0XFwl7@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <87inu8gpqv.fsf@gnu.org>

Show all headers | View raw


In comp.lang.java.programmer message <87inu8gpqv.fsf@gnu.org>, Wed, 7
Sep 2016 08:58:48, Tassilo Horn <tsdh@gnu.org> posted:

>Hi all,
>
>I have a
>
>  DateTimeFormatter FORMATTER_KW = DateTimeFormatter.ofPattern("ww.YYYY");
>
>for formatting LocalDates as calendar weeks.


Firstly, you need to say, clearly, what your definition of Week
Numbering is.

You seem to be at U.Koblenz, so you should be using ISO 8601 weeks, in
which all weeks are Mon=1 to Sun=7 and Week 01 contains January 4th
(i.e. is the first week which is all or mostly in the Gregorian Year),
so the last week of the year is numbered 52 or 53; there is never a Week
00 or a Week 54.

ISO Week Numbering is used throughout the sensible part of the Gregorian
world, but not much along the Mexico-Canada borderland.

<http://web.archive.org/web/20150723023855/http://www.merlyn.demon.co.uk
/weekinfo.htm> or later, <http://web.archive.org/web/20150711063435/http
://www.merlyn.demon.co.uk/weekcalc.htm> or later, and <http://web.archiv
e.org/web/20150703002408/http://www.merlyn.demon.co.uk/js-date7.htm> or
later, might help readers; but their code is not Java.

-- 
 (c) John Stockton, Surrey, UK.  ¬@merlyn.demon.co.uk   Turnpike v6.05   MIME.
 Merlyn Web Site <                       > - FAQish topics, acronyms, & links.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Parsing calendar weeks to LocalDates with DateTimeFormatter Tassilo Horn <tsdh@gnu.org> - 2016-09-07 08:58 +0200
  Re: Parsing calendar weeks to LocalDates with DateTimeFormatter Tassilo Horn <tsdh@gnu.org> - 2016-09-07 10:11 +0200
  Re: Parsing calendar weeks to LocalDates with DateTimeFormatter Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-09-09 22:46 +0100
    Re: Parsing calendar weeks to LocalDates with DateTimeFormatter Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-09-11 16:43 +0100
      Re: Parsing calendar weeks to LocalDates with DateTimeFormatter Lew <lewbloch@gmail.com> - 2016-09-13 17:50 -0700
        Re: Parsing calendar weeks to LocalDates with DateTimeFormatter Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-09-17 19:34 +0100
    Re: Parsing calendar weeks to LocalDates with DateTimeFormatter Tassilo Horn <tsdh@gnu.org> - 2016-09-12 09:18 +0200
      Re: Parsing calendar weeks to LocalDates with DateTimeFormatter Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-09-13 23:39 +0100

csiph-web