this post was submitted on 20 Jul 2024
5 points (100.0% liked)

memes

9312 readers
1612 users here now

Community rules

1. Be civilNo trolling, bigotry or other insulting / annoying behaviour

2. No politicsThis is non-politics community. For political memes please go to [email protected]

3. No recent repostsCheck for reposts when posting a meme, you can only repost after 1 month

4. No botsNo bots without the express approval of the mods or the admins

5. No Spam/AdsNo advertisements or spam. This is an instance rule and the only way to live.

Sister communities

founded 1 year ago
MODERATORS
 
top 11 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 months ago (1 children)

I wrote a program to figure out what day of the week this landed on (assuming it is in fact October 2nd, 151441).

It's a Saturday.

Real downer on the start of the weekend.

[–] [email protected] 1 points 2 months ago (1 children)
[–] [email protected] 0 points 2 months ago (1 children)

Yep, my immediate thought was, how the hell would you know it works?

[–] [email protected] 1 points 2 months ago (1 children)

That program better be using an existing date library, because otherwise it's most definitely wrong.

[–] [email protected] 2 points 2 months ago* (last edited 2 months ago) (1 children)

public string GetDayOfWeek(DateTime date) => "saturday";

I also calculated it, his result checks out.

[–] [email protected] 1 points 2 months ago

Don't be ridiculous, that would never pass QA.

But this one will. Joy for years to come:

public string GetDayOfWeek(DateTime date) {
    return ((date - new DateTime(1970, 1, 1)).Milliseconds / 86400000) % 7 switch {
        0 => "Thursday",
        1 => "Friday",
        2 => "Saturday",
        3 => "Sunday",
        4 => "Monday"
    };
}
[–] [email protected] 0 points 2 months ago (1 children)

Best by ≠ Expiration date

It's the truth, and I'm tired pretending it's not.

[–] [email protected] 1 points 2 months ago

It's just not in its best condition.
Another 720000 years before expiry.

[–] [email protected] 0 points 2 months ago (2 children)

1441 is most likely the time stamp sorry guys...

(Not sure if Canada follows US or internal date format)

[–] [email protected] 1 points 2 months ago

Canadian here. We're not sure either.

[–] [email protected] -1 points 2 months ago

Slashes mean whatever american abomination