Bug 124209 - AM/PM time notation in CALC
Summary: AM/PM time notation in CALC
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Number-Format
  Show dependency treegraph
 
Reported: 2019-03-19 15:32 UTC by gmarco
Modified: 2019-05-03 17:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gmarco 2019-03-19 15:32:19 UTC
Following on Bug 105226 (2017-01-09 / 2018-01-27) I propose again some questions about AM/PM time notation and other problems about help (IT) examples.

ORARIO
( https://help.libreoffice.org/6.2/it/text/scalc/01/func_time.html?DbPAR=CALC#bm_id3154073 )
Esempio
=ORARIO(0;0;0) restituisce 00:00:00
=ORARIO(4;20;4) restituisce 04:20:04

## it depends by cell-format and can be:
00:00
00:00:00
0.00
0.00.00
00:00,00
00:00:00,00
12:00 a.m.
        but this is senseless: 12 o'clock comes after 11:59 and before 12:01 (*)
12:00:00 a.m.     but this is ... idem
12.00 a.m.        but this is ... idem
12.00.00 a.m.     but this is ... idem

(*) if =ORARIO(23;59;59) gets 11:59:59 p.m.
  and  =ORARIO(0;0;0) gets 12:00 a.m.  when time will be 0:00:00?


ORARIO.VALORE
( https://help.libreoffice.org/6.2/it/text/scalc/01/func_timevalue.html?DbPAR=CALC#bm_id3146755 )
Esempio
=ORARIO.VALORE("4PM") restituisce 0,67. Nel formato orario HH:MM:SS viene visualizzato 16:00:00.

## as exemplified it gets ERR:502,  it has to be "4P.M." or "4p.m."
Comment 1 gmarco 2019-03-19 17:46:33 UTC
look at this too:

         format:  HH.MM.SS   HH.MM.SS AM/PM
=ORARIO(23;59;59)  23:59:59   11:59:59 p.m.
=ORARIO(24;59;59)  00:59:59   12:59:59 a.m. (senseless)
=ORARIO(24;59;60)  01:00:00   01:00:00 a.m. OK but look at SS=60
=ORARIO(23;59;60)  00:00:00   12:00:00 a.m. (senseless)
=ORARIO(23;60;60)  00:01:00   12:01:00 a.m.    " 
=ORARIO(23;60;61)  00:01:01   12:01:01 a.m.    " 
=ORARIO(23;119;59) 00:59:59   12:59:59 a.m.    " and look at MM=119
=ORARIO(23;119;60) 01:00:00   01:00:00 a.m. OK but look at MM=119
                                                       and SS=60
Comment 2 gmarco 2019-03-20 21:06:57 UTC
forgotten example
## as exemplified it gets ERR:502,  it has to be "4P.M." or "4p.m."

Err:502    ← =ORARIO.VALORE("4PM")   
16:00:00   ← =ORARIO.VALORE("4P.M.")   
16:00:00   ← =ORARIO.VALORE("4p.m.")
Comment 3 Eike Rathke 2019-03-25 14:29:20 UTC
I don't get what the actual problems are, except that "4PM" results in error because the format to be parsed has to match a locale's specified AM/PM symbol, which is "p.m." here, not "pm".

Specifically the "(senseless)" comments don't make sense to me. Times between 00:00:00 and 00:59:59 in AM/PM notation *are* 12:..:.. AM, there is no 00:..:.. AM.
The TIME() function (ORARIO()) does advance by the arguments given, so =TIME(23;119;59) is indeed 00:59:59 and =TIME(23;119;60) is 01:00:00
Comment 4 gmarco 2019-03-25 15:54:42 UTC
Well, I said
 "if =ORARIO(23;59;59) gets 11:59:59 p.m.
  and  =ORARIO(0;0;0) gets 12:00 a.m.
  when time will be 0:00:00?"

and, I can add, looking at this sequence
'=ORARIO(23;59;59)   11:59:59 p.m.
'=ORARIO(0;0;0)      12:00:00 a.m.   ?
'=ORARIO(0;0;1)      12:00:01 a.m.   ?
'=ORARIO(1;0;0)      01:00:00 a.m.
'=ORARIO(12;0;0)     12:00:00 p.m.

if 1;0;0 is 01 a.m. why 0;0;0 is 12 a.m.?
for me saying 24 means midnight and one second later is one second after midnight, not after twelve o'clock.
Comment 5 Eike Rathke 2019-05-03 16:02:15 UTC
I repeat:
Times between 00:00:00 and 00:59:59 in AM/PM notation *are* 12:..:.. AM, there is no 00:..:.. AM.
Comment 6 gmarco 2019-05-03 17:04:29 UTC
well, it will be NOTABUG, but really it is NOTALOGIC!

The sequence will be:
11:59:59 p.m.
12:00:00 a.m.
...
12:00:59 a.m.
01:00:00 a.m.
...
11:59:59 a.m.
12:00:00 p.m.


is it not wonderful ?
Comment 7 gmarco 2019-05-03 17:15:43 UTC
and HELP is still wrong:
=TIMEVALUE("4PM") returns 0.67. When formatting in time format HH:MM:SS, you then get 16:00:00.


It gets ERR:502,  it has to be "4P.M." or "4p.m."