JCL Help:Make4DigitYear

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Converts a 2 digit year into a 4 digit year.


Pascal

 function Make4DigitYear(Year: Integer; Pivot: Integer): Integer;


Parameters

Parameters Description
Year: Integer The 2 digit year to convert. Is asserted to be in the range 0..100
Pivot: Integer The base of the 100 year window. Is asserted to be in the range 0..100


Return Value

The 4 digit year.


Description

Make4DigitYear converts a two digit year into a 4 digit year using Pivot as the base of a 100 year window. If Year is smaller the Pivot then the result will be 2000 + year, if the Year is greater or equal to Pivot the result is 1900 + Year.


See Also

MakeYear4Digit


About

Unit

JclDateTime


Donator

Marcel van Brakel


Notes

If Year or Pivot is 100 they are converted to 0 first.


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page