Wrong format for FI at least

Recommend this page to a friend!

      Format.js  >  All threads  >  Wrong format for FI at least  >  (Un) Subscribe thread alerts  
Subject:Wrong format for FI at least
Summary:FI does not have the format the code has
Messages:3
Author:Markku Niskanen
Date:2014-09-04 12:33:36
 

  1. Wrong format for FI at least   Reply   Report abuse  
Picture of Markku Niskanen Markku Niskanen - 2014-09-04 12:33:36
Finland uses D.M.YYYY, not DD/MM-AA as in the code. So 2013-09-06 (September 6th) should be 6.9.2014 (without leading zeros)

en.wikipedia.org/wiki/Date_format_b ...

Swedish standard is yyyy-mm-dd though others are used. Norwegian is wrong as well.

There might be other errors as well, please check the Wikipedia list.

  2. Re: Wrong format for FI at least   Reply   Report abuse  
Picture of Pierre FAUQUE Pierre FAUQUE - 2014-09-07 22:37:21 - In reply to message 1 from Markku Niskanen
Hello Markku,

Thank you in your interest in this object extension.
You're right : Finland uses D.M.YYYY (without leading zeros). It was an error from me.

However I don't know the date format of all countries. It's the reason why I have used Wikipedia (and I have given the reference of the page I consulted) and it's the reason why I have uploaded the code of script in a large wrinting (Format.large.js) to allow everyone to make corrections or to add new formats knowing :
d is the day (0..31)
dd is the day (00..31)
m is the month (0..12)
mm is the month (00.12)
as is the year (short: 2 digits) (you can change a (année) by y (year)
af is the year (full: 4 digits) "" "" "" ""
the it's easy to correct a format not specified with precision in Wikipedia or to add a new format.
Correction for FI is done ans uploaded :o)

  3. Re: Wrong format for FI at least   Reply   Report abuse  
Picture of Pierre FAUQUE Pierre FAUQUE - 2014-09-09 11:16:51 - In reply to message 1 from Markku Niskanen
In the correction uploaded, the values of days, months and year are stored in the following variables (if sometimes you have to modify or add a format) :

days : d = 1..31 ; D = 01..31
months : m = 1..12 ; M = 01..12
years : y = 14 ; Y = 2014

If you want to add a new format, add a new line in the f Array and a new case in the switch() statement.

Feel yourself free to comment what you want.
Best regards.