Announcement

Collapse
No announcement yet.

Help (os.time() Year 1969)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help (os.time() Year 1969)

    This works well.

    Code:
    function FeToJulian(DD_MM_YYYY)
    	rD = String.Left(DD_MM_YYYY, 2); rM = String.Mid(DD_MM_YYYY, 3, 2); rY = String.Right(DD_MM_YYYY, 4);
    	rDate = os.time({day=rD, month=rM, year=rY });
    	return Math.Floor((rDate / 86400) + 2440588);
    end
    
    Dialog.Message("Julian", FeToJulian(24051965))
    But when the year is less than 1970 fails.
    Anyone can help me to fix...

    From already thank you very much to the whole community.

  • #2
    os.time counts in seconds, so it has a limited range, usually from 1970-2038 (signed 32 bit int).
    Plugins:

    Bitmap (113 KB)

    ComboBoxEx (141 KB)

    Comment

    Working...
    X
    😀
    🥰
    🤢
    😎
    😡
    👍
    👎