How to identify day change in java -


i want know how can identifies if there date changes i.e. 23:59 00:00. using servlet. can using static string type variable , assign "dd" part of below returned date stamp , comparing on every request current "dd" date stamp. if both "dd" part not match sign of date change. there 1 static int type variable want reset zero increment till day change.

private static string getdate()     {         simpledateformat customformat = new simpledateformat("hh:mm:ss dd-mm-yyyy");         return customformat.format(new date(system.currenttimemillis()));     } 

but how can without comparing it, there better way it? thanks.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -