年齢から生年月日の範囲を求める
基準日時点の生年月日の範囲
基準日が空欄の場合、現在の日付より算出
Find the range of date of birth from age
Range of birth dates as of the referenceDate
If the referenceDate is blank, calculate from the current date.
Sample input(入力例)
GetBirthdayRange ( 52 ; "2022/03/14" )
Sample output(出力例)
1969/03/15...1970/03/14
基準日が空欄の場合、現在の日付より算出
If the referenceDate is blank, calculate from the current date.
Sample input(入力例)
GetBirthdayRange ( 52 ; "" )
Sample output(出力例)
1969/03/15...1970/03/14
満年齢 の場合、+ 2 を追加
;~startDate = Date ( Month ( ~td ) ; Day ( ~td ) ; Year ( ~td ) -~age - 1 ) + 2
;~endDate = Date ( Month ( ~td ) ; Day ( ~td )-1 ; Year ( ~td ) -~age ) + 2
2022/03/14
出力結果が、1日連れていたのを修正
;~startDate = Date ( Month ( ~td ) ; Day ( ~td ) ; Year ( ~td ) -~age - 1 )
;~endDate = Date ( Month ( ~td ) ; Day ( ~td )-1 ; Year ( ~td ) -~age )
↓
;~startDate = Date ( Month ( ~td ) ; Day ( ~td ) ; Year ( ~td ) -~age - 1 ) + 1
;~endDate = Date ( Month ( ~td ) ; Day ( ~td )-1 ; Year ( ~td ) -~age ) + 1