You are viewing a single thread.
View all comments View context
-7 points
*

Most date libraries count to 23h 59m 59s then roll over to 00h 00m 00s. So the answer is 23 hours, not 24.

Edit: I’m big dum dum. It’s asking string length of “Monday”, thus 6.

permalink
report
parent
reply
22 points

You’re also mistaken about the time too. The first second of the day is 00:00:00 the last second of the day is 23:59:59

That’s still a full and exact 24 hours.

permalink
report
parent
reply
9 points

Yes, it’s a full 24 hours, but a library doesn’t use 24:00:00 to represent the last hour, it’s 23:59:59. Once it hits 24:00, it rolls over to 00:00:00.

Hence my initial error of answering 23.

It’s not valid, but I don’t edit out erronous answers because I believe all data should be preserved, no matter how dumb it makes one look.

permalink
report
parent
reply
8 points

00:00:00 is the 1st second of the day. 23:59:59 is the 86400th second of the day. That’s 24 hours.

permalink
report
parent
reply
2 points

It’s not valid, but I don’t edit out erronous answers because I believe all data should be preserved, no matter how dumb it makes one look.

Doing the lord’s work.

I have but one up vote and you already have it.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 5.2K

    Monthly active users

  • 1K

    Posts

  • 38K

    Comments