JavaScript Date functions

Functions Description
Date ObjectDisplaying date and time in an alert window
getTime()milliseconds that is passed from January 1, 1970
getMonthmonth part of the date object, showing month number from 0 to 11
getYearGetting the year in YYYY format from the data object
getDateDate of the month starting from 1 to 31 and formatting
getDayReturns 0 for Sunday and 1 for Monday .. 6 for Saturday
getMinutesMinute part of the date object, starting from 0 to 59
getHoursHour part of the date object, starting from 0 to 23
getSecondsSeconds part of the date object, starting from 0 to 59
setDateChanging the date object by changing the date of the month
setMonthSetting the month part of the date object by using numbers 0 to 11
setfullyearSetting to full year the date object
setHoursChanging the hour part of date object, from 0 to 23 or to any other value
setMinutesChanging the Minute part of date object, from 0 to 59 or to any other value
toStringBefore using any string functions we have to change date output to string
toLocaleStringDate output to local string conversion
toDateStringChanging to date to String
toLocalDateStringChanging to date to Local date String
toTimeStringGetting the time string part from the date object
toUTCStringConverting to UTC time string
setTimeoutTimer to execute functions at an interval
clearTimeout()Resetting the timer before interval
Recursive timerExecuting function again and again by timer
countdown timerBalance time left or countdown to an event
ClockRealtime clock displaying hour minutes and sec.
Timezone ClockRealtime clock of different time zones of the world.
Array TimezoneJavaScript Array of names of different time zones of the world.
Time Left for New YearCountdown shwoing days : Hour : minutes : Seconds left for New year.

Sample date projects using Date and time in JavaScript

Sample projects with demo using JavaScript Date object

Draw Analog Clcok on Canvas using Jquery or JavaScript.

Analog Clock using HTML Canvas


  • Video Tutorial on Real time changing JavaScript Clock



Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com




    Vijay

    21-02-2012

    how to alert a user after he reached the duedate for payment of water bill(for example)lets say 2 months ??

    Post your comments , suggestion , error , requirements etc here .




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer