adamdriscoll / poshprotools

PowerShell Pro Tools and Universal Dashboard
https://ironmansoftware.com/
104 stars 24 forks source link

Dates are not localized #223

Open kort3x opened 6 years ago

kort3x commented 6 years ago

Dates should be displayed according to locale settings of system

adamdriscoll commented 6 years ago

@kort3x The default format for dates is Moment.js's lll format. This should localize dates in grids and tables in the most recent beta. You can change the DateTimeFormat on either of those to match what you need.

http://momentjs.com/docs/#/displaying/

Let me know if that isn't working.

kort3x commented 6 years ago

The default is not showing format localized for Germany (24h format, German names for Days/Months).

Getting a 24h format is simple enough (-DateTimeFormat "YY.MM.DD HH:mm:ss") but I dont know how to get German names for days or months and I am afraid the documentation on momentjs is over my head.

Can someone help me out?

adamdriscoll commented 6 years ago

I see what I'm missing here. I need to include a different momentjs package with the localized dates (e.g. translated Days\Months) and allow you to switch the locale.