changeset 730:d3fb3613726a

Calendar control should return years with 4 digits not 2.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 15 Mar 2011 01:13:29 +0000
parents 6712e4211522
children 6a589a1a42b0
files mac/dw.m
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Tue Mar 15 00:45:27 2011 +0000
+++ b/mac/dw.m	Tue Mar 15 01:13:29 2011 +0000
@@ -5071,6 +5071,14 @@
     [df setDateStyle:NSDateFormatterShortStyle];
     NSString *nstr = [df stringFromDate:date];
     sscanf([ nstr UTF8String ], "%d/%d/%d", month, day, year);
+    if(*year < 70)
+    {
+        *year += 2000; 
+    }
+    else if(*year < 100)
+    { 
+        *year += 1900;
+    }
     [df release];
 }