Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: two digit year conversion
ctrlbrk
Newbie

Posts: 1
Registered: 8/18/2002
Member Is Offline
posted on 8/18/2002 at 09:08 PM Reply With Quote
two digit year conversion


what changes need to be made for the script to return a two digit year in the form field, instead of the current four digit year?

thx for any help!
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 1926
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 8/19/2002 at 07:03 AM Reply With Quote

You'll need to modify date generation function (remove first digits) and date parsing function (add first digits).
View User's Profile View All Posts By User U2U Member
Siemens
Newbie

Posts: 1
Registered: 5/21/2003
Member Is Offline
posted on 5/21/2003 at 01:27 PM Reply With Quote

Hi,

Could you please give an example of the two changes required.

Regards
Mike Sutton
View User's Profile View All Posts By User U2U Member
nik


Posts:
Registered: 1/1/1970
Member Is Offline
posted on 5/22/2003 at 08:30 AM Reply With Quote

Here is an example:
for calendar1.js
// date generating function
function cal_gen_date1 (dt_datetime) {
return (
(dt_datetime.getDate() < 10 ? '0' : '') + dt_datetime.getDate() + "-"
+ (dt_datetime.getMonth() < 9 ? '0' : '') + (dt_datetime.getMonth() + 1) + "-"
+ (''+ dt_datetime.getFullYear()).substring(2,4)
);
}

calendar2.js
/
// date generating function
function cal_gen_date2 (dt_datetime) {
return (
(dt_datetime.getMonth() < 9 ? '0' : '') + (dt_datetime.getMonth() + 1) + "/"
+ (dt_datetime.getDate() < 10 ? '0' : '') + dt_datetime.getDate() + "/"
+ (''+ dt_datetime.getFullYear()).substring(2,4)
);
}
View User's Profile View All Posts By User U2U Member
grasshoppah
Junior Member

Posts: 2
Registered: 2/3/2005
Member Is Offline
posted on 3/10/2005 at 04:44 PM Reply With Quote
two digit year conversion


could you give an example of changes to be made to the date parsing function?
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004