Provides two utility functions (exported by System.Win32.Utils) that translate the date or time format pictures used by the Windows API (see here and here) to the nearest equivalent format strings used by Data.Time.Format.formatTime of the time package.
For example (for locale nl-NL), Windows format picture dddd d MMMM yyyy is translated to format string %A %-e %B %Y.
Also applies hlint hints to System.Win32.Utils.hs, so that the whole module passes hlint.
Tested by
Motivation and Context
In order to make use of the format pictures returned for a locale by getLocaleInfoEx in the time package, it is necessary to bridge between the format pictures that the Windows API uses and the format strings that the time package uses.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] I have updated the documentation accordingly.
[x] I have not added a new Haskell dependency.
[x] I have included a changelog entry.
[x] I have not modified the version of the package in Win32.cabal.
Description
Provides two utility functions (exported by
System.Win32.Utils
) that translate the date or time format pictures used by the Windows API (see here and here) to the nearest equivalent format strings used byData.Time.Format.formatTime
of thetime
package.For example (for locale
nl-NL
), Windows format picturedddd d MMMM yyyy
is translated to format string%A %-e %B %Y
.Also applies
hlint
hints to System.Win32.Utils.hs, so that the whole module passeshlint
.Tested by
Motivation and Context
In order to make use of the format pictures returned for a locale by
getLocaleInfoEx
in thetime
package, it is necessary to bridge between the format pictures that the Windows API uses and the format strings that thetime
package uses.Types of changes
Checklist:
Win32.cabal
.