[Gambas-user] [Gambas Bug Tracker] Bug #704: Format does not handle time separator correctly
Jussi Lahtinen
jussi.lahtinen at ...626...
Sat Aug 29 16:30:05 CEST 2015
> Ok, understood. Both Format$() and Format() use it
>
> Debug sLangu;; "Now()="; Now();; "Format$="; Format$(Now(), "dd/mm/yyyy
> hh:nn:ss.uu");; " Format="; Format(Now(), "dd/mm/yyyy hh:nn:ss.uu")
>
> MMain.Main.19: en_CA.UTF-8 Now()=2015-08-29 15:38:55 Format$=29-08-2015
> 15:38:55.457 Format=29-08-2015 15:38:55.457
> ------------------------------------
> Debug sLangu; gb.NewLine & gb.Tab; "Now()="; Now(); gb.NewLine & gb.Tab;
> "Format$="; Format$(Now(), "dd/mm/yyyy hh:nn:ss.uu"); gb.NewLine &
> gb.Tab; " Format="; Format(Now(), "dd/mm/yyyy hh:nn:ss.uu")
>
>
> MMain.Main.20: en_CA.UTF-8
> Now()=2015-08-29 15:38:55
> Format$=29-08-2015 15:38:55.457
> Format=29-08-2015 15:38:55.457
>
Format() and Format$() are actually the same function (synonym).
See latest GambasTester if you like to see how I implemented localization
independent test for date formats (begins from row 999).
Not perfect but it will catch rubbish outputs for the separators.
Jussi
More information about the User
mailing list