Closed kazurayam closed 1 year ago
I want to write a code that depends on the value of JobTimestamp given. If the Second is even, the do this, If the Second is odd, then do that, ...
So I need JobTimestamp object to support int getSecond() method.
JobTimestamp
int getSecond()
Not necessary to add int getSecond() method to the JobTimestamp class.
Instead, do this:
JobTimestamp jt = JobTimestamp.now() if (jt.value().getSecond() % 2 == 0) { doThis(); } else { doThat(); }
I want to write a code that depends on the value of JobTimestamp given. If the Second is even, the do this, If the Second is odd, then do that, ...
So I need
JobTimestamp
object to supportint getSecond()
method.