I need to get / print on command line every full hour of every day of a given year, e.g. 2011 but I am struggling to code it in Java.
Has anybody ever coded this issue?
I need to get / print on command line every full hour of every day of a given year, e.g. 2011 but I am struggling to code it in Java.
Has anybody ever coded this issue?
Use Calendar, and loop day after day to manage a "String quoted" as you like by parameter needed,
You can put each line day (usually separated by a comma) in a file
you could easily solve this by using the joda-time library:
This should work:
Notice, for example, this subtlety in the output: