Questions tagged [datetime]
DateTime objects in many programming languages describe an instant in time, expressed as a date and time of day. Use on questions about reviewing code involving date/time logic.
1,048 questions
4 votes
2 answers
124 views
Ruby: Implement an 'add_thirty_days'-method
Task: Implement a method, which receives an array of strings as argument. The strings are dates in the format "MM**DD**YYYY". For example: "11**03**2024". Add 30 to each of the ...
6 votes
3 answers
857 views
C++ Date Model to be used within models in an MVVM application
I'm working on an application that will make extensive use of dates, there will be various forms of input such as a GUI or text files and the data will be stored in a MySQL database. The planned use ...
6 votes
1 answer
158 views
Support Captain Picker in Vanilla JavaScript
I have been tinkering about a program that would pick the support "captain" of the day on workdays with the following rules: Program should only pick a captain on weekdays (Mon. to Fri.). ...
2 votes
0 answers
174 views
Rust implementation of an algorithm I invented (RANDEVU) #2
I came up with an algorithm and created a Rust implementation of it. I've already posted it for code review previously but created another post since I've made many changes to it, including the ones ...
4 votes
1 answer
152 views
Evaluating Extended Operating Hours Past Midnight Across Timezones in PHP
I am working on a project that involves tracking the operating hours of businesses across different timezones. Some of these businesses operate past midnight, and to accommodate this, operating hours ...
2 votes
1 answer
223 views
RANDEVU - Rust crate implementing a simple algorithm I invented
I've created a simple algorithm, implemented it in Rust, and published it as a crate on crates.io. https://crates.io/crates/randevu My code seems pretty clean and idiomatic to me, but I'd like to know ...
7 votes
2 answers
329 views
Subtract two lap times (m:ss:fff)
I have two lap time strings I need to subtract, the format is minutes, seconds, milliseconds. This is to compare a new world record time to the previous holder's ...
5 votes
1 answer
1k views
Determine if it is EU summer time in Java
I wanted to write a utility method for learning purposes to determine if a given date (year, month and day) falls within EU summer time or not, without using any of the Java library methods. Is here ...