H I O X INDIA
FREE Javascript
Google
Web hscripts.com
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

Java Script Source
List All
Date & Time
Calendar
Stop Watch script
Slide Show
Image Effect
Mouse Effects
Color Picker Tool
Dynamic Color
Random Generator
Select All
Form Validation
Textbox Counter
Dynamic Form select
Bookmark
Window / User Info
Security / Authenticate
Status Bar
Title Bar
Cursor Position
Country List
Calculators
Delete Repeated Values
Alphanumeric
Free Games





Days Left in year Function


About
This script function will help you to get days left in the year.


Features
a)The javascript function will return the days left in current year.
b)The function takes date value as argument and returns the days left for the year to end.
c)Just copy the code in to your page and use it.


Preview
Days Left in the year -


Code
<!-- Script by hscripts.com -->
<script language="JavaScript">

function daysleftinyear(date1)
{
var year = date1.getFullYear();
var date2 = new Date(year,11,31);
var diff = Date.UTC(date2.getYear(),date2.getMonth(),date2.getDate(),0,0,0)
    - Date.UTC(date1.getYear(),date1.getMonth(),date1.getDate(),0,0,0);

var daysleft = diff/1000/60/60/24;

return daysleft;
}

document.write(daysleftinyear(new Date()));
</script>
<!-- Script by hscripts.com -->
Release Date - 5-2-2005

Get free version without ©copyright link for just 5



Usage
Just copy the code and use it for free.





License
- This javascript (misspelled as java script)/HTML code is given under GPL License
- i.e. Free use for those who use it as it is.
- Free, if your modification does not remove our copyright information and links.
- Detailed License information can be found here
- You can purchase the script if your requirements does not meet GPL License terms.


privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com

Others