Click here to Skip to main content
15,892,537 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: A new date standard? Pin
Joop Eggen22-Oct-18 1:31
Joop Eggen22-Oct-18 1:31 
GeneralRe: A new date standard? Pin
W Balboos, GHB22-Oct-18 1:51
W Balboos, GHB22-Oct-18 1:51 
GeneralRe: A new date standard? Pin
kalberts22-Oct-18 3:21
kalberts22-Oct-18 3:21 
GeneralRe: A new date standard? Pin
Sander Rossel22-Oct-18 4:57
professionalSander Rossel22-Oct-18 4:57 
GeneralRe: A new date standard? Pin
W Balboos, GHB22-Oct-18 5:14
W Balboos, GHB22-Oct-18 5:14 
GeneralRe: A new date standard? Pin
Sander Rossel22-Oct-18 5:28
professionalSander Rossel22-Oct-18 5:28 
GeneralRe: A new date standard? Pin
W Balboos, GHB22-Oct-18 5:36
W Balboos, GHB22-Oct-18 5:36 
GeneralRe: A new date standard? Pin
kalberts22-Oct-18 2:43
kalberts22-Oct-18 2:43 
The year value -1 should have tipped you off.

If a date value is initialized to all 1 bits, and you interpret it as numeric subfields, 111...11 is -1. So the year comes out as -1. Now for the month, nubered from 0 and upwards, January is month 0. -1 is the month before that, which is December. We go on to the date field: 0 is the first day of the month, and -1 is one day earlier. We were in December, and go one day back: That brings us to November 30th.

Which is the value that you've got. Date -1 of month -1 of year -1 comes out formatted exactly the way you saw it.

I think it would have been more correct if the year was -0002: Like the date -1 pulls the month from December back to November, the month -1 should have pulled the year back to -0002. I read an article about this a few weeks ago (now I pity that I didn't save the URL!) telling that one of the most widespread libraries used for formatting in the *nix world doesn't do that; it gives exactly the value 30-11--0001 for an input of all bits set.
GeneralRe: A new date standard? Pin
Sander Rossel22-Oct-18 4:59
professionalSander Rossel22-Oct-18 4:59 
GeneralRe: A new date standard? Pin
maze322-Oct-18 3:23
professionalmaze322-Oct-18 3:23 
GeneralRe: A new date standard? Pin
Sander Rossel22-Oct-18 5:01
professionalSander Rossel22-Oct-18 5:01 
GeneralRe: A new date standard? Pin
maze322-Oct-18 5:28
professionalmaze322-Oct-18 5:28 
GeneralRe: A new date standard? Pin
Bitbeisser22-Oct-18 9:30
Bitbeisser22-Oct-18 9:30 
GeneralRe: A new date standard? Pin
Bassam Abdul-Baki22-Oct-18 5:00
professionalBassam Abdul-Baki22-Oct-18 5:00 
GeneralRe: A new date standard? Pin
Bitbeisser22-Oct-18 9:31
Bitbeisser22-Oct-18 9:31 
GeneralRe: A new date standard? Pin
Bassam Abdul-Baki22-Oct-18 10:18
professionalBassam Abdul-Baki22-Oct-18 10:18 
GeneralRe: A new date standard? Pin
Bitbeisser22-Oct-18 10:30
Bitbeisser22-Oct-18 10:30 
GeneralRe: A new date standard? Pin
Bassam Abdul-Baki22-Oct-18 11:59
professionalBassam Abdul-Baki22-Oct-18 11:59 
GeneralRe: A new date standard? Pin
Herbie Mountjoy22-Oct-18 17:54
professionalHerbie Mountjoy22-Oct-18 17:54 
GeneralRe: A new date standard? Pin
kalberts22-Oct-18 22:17
kalberts22-Oct-18 22:17 
GeneralRe: A new date standard? Pin
Bassam Abdul-Baki22-Oct-18 23:57
professionalBassam Abdul-Baki22-Oct-18 23:57 
GeneralRe: A new date standard? Pin
Herbie Mountjoy23-Oct-18 23:03
professionalHerbie Mountjoy23-Oct-18 23:03 
GeneralRe: A new date standard? Pin
Bitbeisser22-Oct-18 9:16
Bitbeisser22-Oct-18 9:16 
GeneralFright night Pin
RickZeeland21-Oct-18 3:17
mveRickZeeland21-Oct-18 3:17 
GeneralRe: Fright night Pin
Kornfeld Eliyahu Peter21-Oct-18 3:50
professionalKornfeld Eliyahu Peter21-Oct-18 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.