0

Script to adjust chat screen on mobile browser

I need help to change script for chat features adjust to mobile browser. can anyone help?

7th Oct 2018, 11:47 PM
Patrick van Hek
Patrick van Hek - avatar
1 Answer
0
You can put the date you would like to count down to in a variable in the following way; var oldDate = new Date("01-01-2000"); var now = new Date(); var diff = now - oldDate; Diff is the number of miliseconds between now and the older date You can then calculate the number of weeks/days between now and the other date, which can also be in the future. var days = diff / 1000 / 60 / 60 / 24; // 1000 = milliseconds, 60 seconds, 60 minutes, 24 hours var weeks = days / 7; var years = days / 365.25; // taking into account leapyears with 0.25 days var daysLeft = (years - Math.floor(years)) * 365.25; // Years minus the whole number of years times the number of days in a year // leaves you with the number of days left over after removing the years. // You can then also calculate the hour minutes and seconds left in a similar way
8th Oct 2018, 9:34 AM
Andrew Millar
Andrew Millar - avatar