Recent

Author Topic: Disable localisation for FormatDateTime ?  (Read 491 times)

Nitorami

  • Hero Member
  • *****
  • Posts: 605
Disable localisation for FormatDateTime ?
« on: September 11, 2024, 04:55:39 pm »
Simple question: I am in Germany but need to FormatDateTime() to work with english month names always. Can I disable the localisation (windows) or force the language manually ? Not related to LCL, just for reading/writing text files.
« Last Edit: September 11, 2024, 05:04:13 pm by Nitorami »

Thaddy

  • Hero Member
  • *****
  • Posts: 19386
  • Glad to be alive.
Re: Disable localisation for DateTimeFormat ?
« Reply #1 on: September 11, 2024, 05:04:58 pm »
You can edit the FormatSettings variable (global) or simply save the formatsettings and derive from that and do it locally (TFormatSettings).
objects are fine constructs. You can even initialize them with constructors.

Nitorami

  • Hero Member
  • *****
  • Posts: 605
Re: Disable localisation for FormatDateTime ?
« Reply #2 on: September 11, 2024, 05:09:21 pm »
I thought of this option but hoped there was a simpler way by setting a global language identifier of some sort

 

TinyPortal © 2005-2018