@@ -149,6 +149,11 @@ public static string Usage
149149 /// </summary>
150150 public bool OpenSavedTimers { get ; private set ; }
151151
152+ /// <summary>
153+ /// Gets a value indicating whether to prefer interpreting time of day values as 24-hour time.
154+ /// </summary>
155+ public bool Prefer24HourTime { get ; private set ; }
156+
152157 /// <summary>
153158 /// Gets or sets a value indicating what information to display in the timer window title.
154159 /// </summary>
@@ -292,6 +297,7 @@ private static CommandLineArguments GetArgumentsFromMostRecentOptions()
292297 Sound = options . Sound ,
293298 LoopSound = options . LoopSound ,
294299 OpenSavedTimers = Settings . Default . OpenSavedTimersOnStartup ,
300+ Prefer24HourTime = Settings . Default . Prefer24HourTime ,
295301 WindowTitleMode = options . WindowTitleMode ,
296302 WindowState = windowSize . WindowState != WindowState . Minimized ? windowSize . WindowState : windowSize . RestoreWindowState ,
297303 RestoreWindowState = windowSize . RestoreWindowState ,
@@ -331,6 +337,7 @@ private static CommandLineArguments GetArgumentsFromFactoryDefaults()
331337 Sound = defaultOptions . Sound ,
332338 LoopSound = defaultOptions . LoopSound ,
333339 OpenSavedTimers = false ,
340+ Prefer24HourTime = false ,
334341 WindowTitleMode = WindowTitleMode . ApplicationName ,
335342 WindowState = defaultOptions . WindowSize . WindowState ,
336343 RestoreWindowState = defaultOptions . WindowSize . RestoreWindowState ,
@@ -587,6 +594,19 @@ private static CommandLineArguments GetCommandLineArguments(IEnumerable<string>
587594 argumentsBasedOnFactoryDefaults . OpenSavedTimers = openSavedTimers ;
588595 break ;
589596
597+ case "--prefer-24h-time" :
598+ case "-j" :
599+ ThrowIfDuplicateSwitch ( specifiedSwitches , "--prefer-24h-time" ) ;
600+
601+ bool prefer24HourTime = GetBoolValue (
602+ arg ,
603+ remainingArgs ,
604+ argumentsBasedOnMostRecentOptions . Prefer24HourTime ) ;
605+
606+ argumentsBasedOnMostRecentOptions . Prefer24HourTime = prefer24HourTime ;
607+ argumentsBasedOnFactoryDefaults . Prefer24HourTime = prefer24HourTime ;
608+ break ;
609+
590610 case "--window-title" :
591611 case "-i" :
592612 ThrowIfDuplicateSwitch ( specifiedSwitches , "--window-title" ) ;
0 commit comments