年齢から生年月日の範囲を求める
基準日時点の生年月日の範囲
基準日が空欄の場合、現在の日付より算出

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 ; "2020/12/06" )


Sample output(出力例)
1967/12/06...1968/12/05


基準日が空欄の場合、現在の日付より算出
If the referenceDate is blank, calculate from the current date.

Sample input(入力例)
GetBirthdayRange ( 52 ; "" )


Sample output(出力例)
1968/12/06...1969/12/05

function(関数):
Sample input(入力例):
Sample output(出力例):
formula(式):

/*
GetBirthdayRange ( age ; referenceDate )

年齢から生年月日の範囲を求める
基準日時点の生年月日の範囲
基準日が空欄の場合、現在の日付より算出

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.

GetBirthdayRange ( 50 ; "2021/12/06" )


GetBirthdayRange ( 50 ; "" )
*/

Let([
~age= GetAsNumber ( age )
;~td= If ( IsEmpty ( referenceDate ) ; Get ( 日付 ) ; GetAsDate ( referenceDate ) )
;~startDate = Date ( Month ( ~td ) ; Day ( ~td ) ; Year ( ~td ) -~age - 1 )
;~endDate = Date ( Month ( ~td ) ; Day ( ~td )-1 ; Year ( ~td ) -~age )
];
~startDate & "..." & ~endDate
)