Jonathan Joelson on Nostr: It seems most std libs don’t have a `Date` type because there isn’t much complex ...
It seems most std libs don’t have a `Date` type because there isn’t much complex logic associated with year/month/day. But this tends to result in devs storing dates in a `DateTime` type just because it’s standard, and bugs inevitably ensue when it’s time to execute logic on the date or display it.
A standard `Date` type would solve *so* many problems just by being a standard interchange format.
Published at
2023-12-21 14:59:21Event JSON
{
"id": "9c34d27362f5306936e07ecd5e245ff6639f0ea41d11fbb60be7cad81e89ce23",
"pubkey": "0d88ca2c4aeb89215b2f5aa4cc454bcc187afcbf44f36c4fe4728e351dcd36a8",
"created_at": 1703170761,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/jjoelson/statuses/111618999041881666",
"activitypub"
]
],
"content": "It seems most std libs don’t have a `Date` type because there isn’t much complex logic associated with year/month/day. But this tends to result in devs storing dates in a `DateTime` type just because it’s standard, and bugs inevitably ensue when it’s time to execute logic on the date or display it. \n\nA standard `Date` type would solve *so* many problems just by being a standard interchange format.",
"sig": "5b7897b371c325eec9e4abec729a2de17cb95e101bd3fc140a1c48ecd3a799461a84ed34227e577903cd35eb212780f5354895040a6c69de497ddcac807f486d"
}