kazurayam / materialstore

A domain-specific file system to store "materials" (screenshots, HTML, JSON, XML) collected during End-to-End testings using Selenium WebDriver etc. Features to make "diff" and compiling HTML reports are also included. This is written in pure Java8
Apache License 2.0
0 stars 0 forks source link

want JobTimestamp#withSecond(int), withMinute(int), withHour(int) #392

Closed kazurayam closed 1 year ago

kazurayam commented 1 year ago

I want to get the JobTimestamp of which year, month, days is equal to JobTimestamp.now() but the hour, minutes and seconds are equal to 0. I want to write it as this:

JobTimestamp now = JobTimestamp.now()
JobTimestamp lastMidnight = now.withHour(0).withMinute(0).withSecond(0)
println lastMidnight;  // => "20221213_000000"