Browse Source

fixed getDay

Nicolas Cannasse 17 years ago
parent
commit
4bea955bcc
2 changed files with 2 additions and 2 deletions
  1. 1 0
      doc/CHANGES.txt
  2. 1 2
      std/neko/NekoDate__.hx

+ 1 - 0
doc/CHANGES.txt

@@ -39,6 +39,7 @@ TODO inlining : substitute class+function type parameters in order to have fully
 	implemented php.Lib.getClasses()
 	fixed duplicate fields in Type.getInstanceFields on subclass
 	Enum is no longer defined inside Type but is standalone class
+	fixed Date.getDay on Neko/Windows (use %w instead of %u)
 
 2008-07-28: 2.0
 	fixed current package bug in inherited constructor type

+ 1 - 2
std/neko/NekoDate__.hx

@@ -63,8 +63,7 @@ class NekoDate__ //implements Date
 	}
 
 	public function getDay() : Int {
-		var d = Std.parseInt( new String(date_format(__t,untyped "%u".__s)) );
-		return if( d == 7 ) 0 else d;
+		return Std.parseInt( new String(date_format(__t,untyped "%w".__s)) );
 	}
 
 	public function toString():String {