Comments (5)
The updated french config is published in 9.1.2.
from elm-date-extra.
What format string are you using and what is the expected result verse the actual result you receive ?
Here is an example on Ellie that might make it easier for you to provide an example.
https://ellie-app.com/47J5ZYs396Fa1/4
In my timezone the result is.
1 => Hour(24): 22 Hour(12): 10 Suffix: [PM] offset: +1000
2 => Hour(24): 01 Hour(12): 01 Suffix: [AM] offset: +1000
from elm-date-extra.
I just reread your description and maybe you are saying the defaults for french you don't believe are accurate ?
The file Config_fr_fr.elm defines the standard formats.
This is the current values of the format strings.
format =
{ date = "%-d/%m/%Y" -- d/MM/yyyy
, longDate = "%A, %-d %B %Y" -- dddd, d MMMM yyyy
, time = "%-I:%M %p" -- h:mm tt
, longTime = "%-I:%M:%S %p" -- h:mm:ss tt
, dateTime = "%-d/%m/%Y %-I:%M %p" -- date + time
, firstDayOfWeek = Date.Mon
}
from elm-date-extra.
Sorry for my late answer.
Yes, the defaults are not correct. Here is my updated version (note that I couldn't access the Default
module for the twelveHourPeriod
variable):
frenchConfig : Config.Config
frenchConfig =
{ i18n =
{ dayShort = French.dayShort
, dayName = French.dayName
, monthShort = French.monthShort
, monthName = French.monthName
, dayOfMonthWithSuffix = French.dayOfMonthWithSuffix
, twelveHourPeriod = (\a -> "")
}
, format =
{ date =
"%-d/%m/%Y"
-- d/MM/yyyy
, longDate =
"%A, %-d %B %Y"
-- dddd, d MMMM yyyy
, time =
"%-H:%M"
-- h:mm tt
, longTime =
"%-H:%M:%S"
-- h:mm:ss tt
, dateTime =
"%-d/%m/%Y %-H:%M"
-- date + time
, firstDayOfWeek = Date.Mon
}
}
As you can see, I'm using %H
for hours and not %I
and I don't use %P
any more because in France we only use 24h format ;)
By the way, what is the -
(hyphen) used for between %
and the format letter?
from elm-date-extra.
The doc for the formatting codes is at https://github.com/rluiten/elm-date-extra/blob/master/DocFormat.md.
The link to DocFormat use to work on elm site but I dont think it works anymore elm, I will look at correcting that with this update.
The -
prefix means the the number is output as 1 or 2 digits, no padding zeros to always make it 2 digits.
Just checked Moment.js french format and they use 2 digits for hours, so I'll modify that as well.
from elm-date-extra.
Related Issues (20)
- Utils.isoWeek may return wrong results HOT 3
- Remove Debug.log from package before publishing HOT 6
- Problem with dayList HOT 5
- Date.Extra.Format.isoString isn't parsable in Safari. HOT 6
- Questions: I cant see to find a method to find next date. HOT 2
- Huge RAM consumption when calling Date.Extra.Utils.dayList with a negative integer. HOT 3
- Consider adding elm packages link to github description HOT 1
- Months subtraction HOT 2
- Problem using period with a timezone HOT 5
- Swedish localization not found HOT 2
- utcIsoWeekString : Date -> String HOT 4
- Date.Extra.Compare takes time into account HOT 1
- Add Year as possible value for the Period data type HOT 1
- Period.add (Period.Delta (Period.diff d1 d2)) 1 d2 /= d1 HOT 5
- Test suite fails to run HOT 3
- dateFromFields and timeFromFields documentation could be improved HOT 4
- en-us time format uses 24 hrs and am/pm HOT 2
- What happened to Date.floor? HOT 1
- Release for Elm 0.19? HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elm-date-extra.