|
Do I add it manually
String s = c.get (java.util.Calendar.YEAR) + "00" + c.get (java.util.Calendar.DAY_OF_YEAR);
In this way, 2017005 is displayed, and 20175 is displayed without addition
This is not a question of string addition
But thank you anyway! !
<SCRIPT language = javascript> <!-
BirthDay = new Date ("january 01,2000"); // Change to your timing date
today = new Date ();
timeold = (today.getTime ()-BirthDay.getTime ());
sectimeold = timeold / 1000
secondsold = Math.floor (sectimeold);
msPerDay = 24 * 60 * 60 * 1000
e_daysold = timeold / msPerDay
daysold = Math.floor (e_daysold);
e_hrsold = (e_daysold-daysold) * 24;
hrsold = Math.floor (e_hrsold);
e_minsold = (e_hrsold-hrsold) * 60;
minsold = Math.floor ((e_hrsold-hrsold) * 60);
seconds = Math.floor ((e_minsold-minsold) * 60);
//->
</ SCRIPT> <SCRIPT language = javascript> <!-
document.write (2017);
document.write (daysold);
//->
</ SCRIPT>
This can also show your effect |
|