New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More support for ISO 8601 WeekYear and WeekOfWeekYear #120

Closed
GoogleCodeExporter opened this Issue Mar 15, 2015 · 6 comments

Comments

Projects
None yet
2 participants
@GoogleCodeExporter

GoogleCodeExporter commented Mar 15, 2015

At a minimum we should be able to construct a LocalDate from the WeekYear and 
WeekOfWeekYear.  Something as simple as:

new LocalDate(2012, 1, IsoDayOfWeek.Tuesday); // WeekYear 2012 Week 1

As evidenced by 
http://stackoverflow.com/questions/11342856/localdate-from-week-and-weekyear I 
am not the only user that has needed this.

More advanced support, the need for which is hinted at in a comment on the 
stackoverflow answer, would be to have a type to represent a week.  I would 
also find this helpful and would it fit better with the Noda time approach.  
Something like:

var week = new LocalWeek(2012, 1);
var date = week.On(IsoDayOfWeek.Tuesday); // create a LocalDate
date.Week // Get the LocalWeek for a date

The LocalWeek would be a year and week only.

Original issue reported on code.google.com by WalkerCo...@gmail.com on 11 Oct 2012 at 8:58

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Mar 15, 2015

Things like LocalWeek, DayMonth (for birthdays) and YearMonth (for credit card 
expiry) are all feasible - but I'd like to have really compelling evidence that 
this will be of benefit to *quite a few* people before including it.

The construction of a LocalDate from a year/week/day definitely makes sense 
though - and should be fairly simple to do given the underlying calendar 
support.

Original comment by jonathan.skeet on 11 Oct 2012 at 9:04

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Mar 15, 2015

This issue was closed by revision 9ab737c07631.

Original comment by jonathan.skeet on 19 Oct 2012 at 11:30

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Mar 15, 2015

Original comment by malcolm.rowe on 23 Oct 2012 at 11:54

  • Added labels: Type-Enhancement, Milestone-1.0
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Mar 15, 2015

Original comment by malcolm.rowe on 10 Nov 2012 at 10:20

  • Added labels: Milestone-1.0.0
  • Removed labels: Milestone-1.0
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Mar 15, 2015

This issue was closed by revision 49a6639f918f.

Original comment by jonathan.skeet on 7 Aug 2014 at 9:44

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Mar 15, 2015

Gah - wrong issue... revision 49a6639f918f fixes issue 320, not this one...

Original comment by jonathan.skeet on 7 Aug 2014 at 9:47

@malcolmr malcolmr modified the milestone: 1.0.0 Mar 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment