DEV Community

Discussion on: Time conversion

Collapse
 
michaeltharrington profile image
Michael Tharrington

Yo! This is a really interesting and helpful post, Kleciann. Appreciate ya sharing! ๐Ÿ™Œ

So, this isn't related to converting 12- to 24-hour time formats, but there's something I've been wondering in regards to coding time... do you know if there's anything special that needs to be done to account for leap year? I reckon once every four years the calendar needs to add in another day for February, but I wonder what the approaches for this are...

Collapse
 
kecbm profile image
Klecianny Melo

Hello @michaeltharrington, how are you? Thinking about it, I think that whether the year is a leap year or not will not affect this hour conversion scenario. Because every 4 years we have 1 extra day in February, I believe it only affects the conversion of days. It makes sense? ๐Ÿค”

Collapse
 
michaeltharrington profile image
Michael Tharrington

That does make sense, Klecianny! Appreciate ya hitting me back. Sounds like it's mot so much a time problem (as in clock) but more of a date issue (calendars)... got it!

Thread Thread
 
kecbm profile image
Klecianny Melo

Sounds is great! I thank you for your contribution to the article @michaeltharrington! I was thinking about this issue these days and realized this point I mentioned. I look forward to seeing you in the next posts so we can reflect on code or a career in technology ๐Ÿ˜

Collapse
 
kecbm profile image
Klecianny Melo

Hello @michaeltharrington, how are you? I studied the resolution to the time conversion problem only in this initial format. It's true, we have leap years like 2024, with 1 extra day in February. There must be an algorithm that takes this information into account. Thank you for your contribution! ๐Ÿ˜

Collapse
 
michaeltharrington profile image
Michael Tharrington

Heyo! Doing well, thankya. ๐Ÿ˜€

No worries, totally understand that my question is kinda beyond the scope of this article. The two are connected because they are both about time, but def handled by different things. Anywho, really dig your article and thanks again for sharing with us. ๐Ÿ™Œ

Thread Thread
 
kecbm profile image
Klecianny Melo

It's true, your question complements my development because it relates to time. Thank you for the complement! ๐Ÿ˜