I'm working on a script that converts PM times to 24 hour format.
The core of that script is this:
As this is, you can select any number (I'm working with two digit numbers), run the script, and it should make the change. However, here's what the numbers become:
01 - 13
02 - 14
03 - 15
04 - 16
05 - 17
06 - 18
07 - 19
08 - 12
09 - 12
10 - 22
11 - 23
What the heck is causing this?
The core of that script is this:
Code: Select all
var WorkingFile = UltraEdit.activeDocument;
WorkingFile.copy();
Hour = UltraEdit.clipboardContent;
Hour = parseInt(Hour)
if (Hour != 12)
{
Hour += 12;
}
UltraEdit.clipboardContent = Hour;
WorkingFile.paste();
01 - 13
02 - 14
03 - 15
04 - 16
05 - 17
06 - 18
07 - 19
08 - 12
09 - 12
10 - 22
11 - 23
What the heck is causing this?