今天沒來由的想起 Steve Jobs,那就讓好久不見的 Jobs 來協助示範年齡的計算好了。
假設我們要計算 Steve Jobs 的年紀(當然他 2011/10/05 已經前往他的 iCloud 安息了,但總是永遠活在我們的心中),我們就來算算他今年的冥誕吧!
Steve Jobs 出生於 1955/02/24
今天是 2016/10/23
我們利用 FileMaker 強大的日期相關計算功能,再搭配 Script 來處理,請參考網頁:
Calculate the Age of a Person in Years, Months and Days
Years
ElapsedYears (calculation, number result) =
Year ( Get ( CurrentDate ) ) – Year ( Birthdate ) – If ( Get ( CurrentDate ) < Date ( Month ( Birthdate ) ; Day ( Birthdate ) ; Year ( Get ( CurrentDate ) ) ); 1 ; 0 )
上面這段 Script 看起來很長,不要緊,解讀一下會發現,他的意思其實是說:「用『今天』的年份扣掉生日的『年份』,若是今年還沒過過生日,那就再減一歲:如果今年已過了生日,那就剛好。」
計算的方法,如圖:
同場加映,跟 Steve Jobs 同年出生的還有誰呢?
- Bill Gates 比爾蓋茲
- Bruce Willis 布魯斯威利
- Yo-Yo Ma 馬友友
http://www.famousbirthdays.com/year/1955.html
Thank you, Steve.