Home arrow JavaScript arrow Page 5 - Javascript Objects: More Date Methods
JAVASCRIPT

Javascript Objects: More Date Methods


We previously left off discussing a smattering of JavaScript Date Objects. In this tutorial we will continue the discussion, picking up with the GetFullYear() Method. There are a ton of Date methods, so let's get started.

Author Info:
By: James Payne
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
February 11, 2008
TABLE OF CONTENTS:
  1. · Javascript Objects: More Date Methods
  2. · The GetHours() Method
  3. · Putting the Three Together
  4. · The GetTime() Method
  5. · The GetUTDate, Month, FullYear() Methods

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Javascript Objects: More Date Methods - The GetUTDate, Month, FullYear() Methods
(Page 5 of 5 )

These methods work to return the Month, Year, etc. from the Universal Coordinated Time, which is the time according to the World Time Standard. Here they are at work:


<html>

<body>

<script type="text/javascript">

var date=new Date()

var day=date.getDate()

var month=date.getMonth()+1

var year=date.getFullYear()

document.write("Today's date is " + month + "/" + day + "/" + year + "<br />")

document.write("It's almost turkey day. Gobble Gobble!")

</script>

</body>

</html>

This returns:

  Today's date is 11/2/2007
  It's almost turkey day. Gobble Gobble!

Well folks, that's it for this tutorial. Hope to see you in the next tutorial where we will hopefully finish our conversation on the Date Object.

Till then...


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 3 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials