Lots of confusing properties on time-granularity types #103

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

Comments

Projects
None yet
2 participants
@GoogleCodeExporter
The time-granularity types (i.e. LocalDateTime, LocalTime, OffsetDateTime, 
ZonedDateTime) contain a large number of similar-sounding properties:

- MillisecondOfDay
- SecondOfDay
- TickOfDay
- TickOfSecond
- Tick

'Tick' is also misnamed: it's actually 'TickOfMillisecond'. But more 
importantly, it's not clear that all of these are actually useful.

Original issue reported on code.google.com by malcolm.rowe on 2 Aug 2012 at 8:48

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

I would suggest that of these:

- MillisecondOfDay and SecondOfDay should definitely go. These are trivially 
derivable from TickOfDay.

- TickOfDay should stay; in some ways it's the numeric equivalent of LocalTime.

- TickOfSecond and TickOfMillisecond (which would obviously be renamed) are 
tricky. It feels like "millisecond" is really an imposter here, a unit of time 
which we possibly shouldn't care about. On the other hand, we allow it to be 
specified when *constructing* values, and it makes some sense to be able to do 
so, as a more commonly-used "smallest unit" than ticks.

I think I'd like to kill TickOfMillisecond but keep TickOfSecond for the 
moment. Other opinions welcome.

Original comment by jonathan.skeet on 24 Aug 2012 at 12:58

I would suggest that of these:

- MillisecondOfDay and SecondOfDay should definitely go. These are trivially 
derivable from TickOfDay.

- TickOfDay should stay; in some ways it's the numeric equivalent of LocalTime.

- TickOfSecond and TickOfMillisecond (which would obviously be renamed) are 
tricky. It feels like "millisecond" is really an imposter here, a unit of time 
which we possibly shouldn't care about. On the other hand, we allow it to be 
specified when *constructing* values, and it makes some sense to be able to do 
so, as a more commonly-used "smallest unit" than ticks.

I think I'd like to kill TickOfMillisecond but keep TickOfSecond for the 
moment. Other opinions welcome.

Original comment by jonathan.skeet on 24 Aug 2012 at 12:58

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

This issue was closed by revision 2a0a3b957877.

Original comment by jonathan.skeet on 21 Oct 2012 at 2:07

  • Changed state: Fixed
This issue was closed by revision 2a0a3b957877.

Original comment by jonathan.skeet on 21 Oct 2012 at 2:07

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

(The commit automatically closed the issue, but if there are still concerns 
about whether TickOfDay and TickOfSecond are both needed, we can discuss 
them...)

Original comment by jonathan.skeet on 21 Oct 2012 at 2:08

(The commit automatically closed the issue, but if there are still concerns 
about whether TickOfDay and TickOfSecond are both needed, we can discuss 
them...)

Original comment by jonathan.skeet on 21 Oct 2012 at 2:08

@GoogleCodeExporter

This comment has been minimized.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter 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

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

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

@malcolmr malcolmr added the bug label Mar 15, 2015

@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