Recent

Author Topic: TDateTime - Warning: This entry is not correct  (Read 3343 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
TDateTime - Warning: This entry is not correct
« on: September 24, 2021, 02:54:36 pm »

Hmm, stumbled across this wiki entry - https://wiki.freepascal.org/TDateTime

It states that "this entry is not correct" but is unclear if the warning refers to the next paragraph or the whole page.  Either way, seems to me that its undesirable in the extreme to leave a page with a warning like that since 2019 !

It could be the introduction TDateTime is a combination of a date and a time. Attributes: year, month, day, hour, minute, second, and microsecond. thats upsetting someone, you could argue its not exactly correct, but if that is all the problem is, rewriting that line would be almost as easy as putting the warning in.

If the author would care to identify what offends them, maybe someone can fix it ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

lorenzo

  • New Member
  • *
  • Posts: 14
Re: TDateTime - Warning: This entry is not correct
« Reply #1 on: September 24, 2021, 03:16:20 pm »
I'm not the author of the comment.  Until he/she shows up to elaborate, I wonder whether it's simply that 'microsecond' should read 'millisecond'.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: TDateTime - Warning: This entry is not correct
« Reply #2 on: September 24, 2021, 03:31:27 pm »
Unusual for @Thaddy to get- and leave- something in an odd state.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: TDateTime - Warning: This entry is not correct
« Reply #3 on: September 24, 2021, 03:52:58 pm »
I'm not the author of the comment.  Until he/she shows up to elaborate, I wonder whether it's simply that 'microsecond' should read 'millisecond'.

+1: should be millisecond instead of microsecond (fixed, AMHO, in the wiki).
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

Bart

  • Hero Member
  • *****
  • Posts: 5275
    • Bart en Mariska's Webstek
Re: TDateTime - Warning: This entry is not correct
« Reply #4 on: September 24, 2021, 05:08:14 pm »
I removed the warning, since, without any explanation, its a bit useless.

Bart

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: TDateTime - Warning: This entry is not correct
« Reply #5 on: September 25, 2021, 02:09:01 am »
No, sorry to differ but that is still not right. We are at serious risk of some angry face icons....

TDateTime is a combination of a date and a time. The attributes are: year, month, day (to get the day in this first part); hour, minute, second, millisecond (to encode the time in this second part).

A TDateTime is a double, I don't think it has any date or time specif attributes, instead we should say -

TDateTime is stored as a  double, the integer part representing days and the fractional part being fraction of a day. Methods exist in Sysutils (datetimeroutines) that allow reading, writing and calculating with TDateTime, converting to and from a number of formats.

If no one objects, I will make that change.

Davo   
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

dsiders

  • Hero Member
  • *****
  • Posts: 1052
Re: TDateTime - Warning: This entry is not correct
« Reply #6 on: September 25, 2021, 02:56:23 am »
No, sorry to differ but that is still not right. We are at serious risk of some angry face icons....

TDateTime is a combination of a date and a time. The attributes are: year, month, day (to get the day in this first part); hour, minute, second, millisecond (to encode the time in this second part).

A TDateTime is a double, I don't think it has any date or time specif attributes, instead we should say -

TDateTime is stored as a  double, the integer part representing days and the fractional part being fraction of a day. Methods exist in Sysutils (datetimeroutines) that allow reading, writing and calculating with TDateTime, converting to and from a number of formats.

If no one objects, I will make that change.

Davo

Any particular reason for not submitting it as a patch to the official docs?
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: TDateTime - Warning: This entry is not correct
« Reply #7 on: September 25, 2021, 03:05:34 am »
I want to get it right, and agreed right (still worried about those angry face icons) first.

The official docs (ie F1 help) is almost completely empty.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018