次回の「システム管理者感謝の日」は?

「システム管理者感謝の日」は毎年やってきます。
「システム管理者感謝の日」はいつなのか?が気になりますよね。
毎年7月最後の金曜日なので、毎年、日にちが少しづつ違っています。
そこで、未来の「システム管理者感謝の日」を調べるスクリプトをpython で作成しました。
これなら、100年先、200年先の「システム管理者感謝の日」を調べることが可能です。
以下がそのスクリプトです。2000年から、500年分の「システム管理者感謝の日」を表示します。

python スクリプト

 1#!/usr/bin/env python
 2# -*- coding: utf-8 -*-
 3
 4import datetime
 5import locale
 6
 7# 2000年から、200年分の「システム管理者感謝の日」を調べる。
 8# 以下のようにして、実行して下さい。
 9# > python.exe .\checkSAD.py
10
11# d        = datetime.date(1970,  1,  1)  # UNIX歴の最初の日をスタートとする。
12d          = datetime.date(2000,  1,  1)  # 2000/1/1を検索のスタート日とする。
13LastFriday = datetime.date(2000,  7,  6)  # 最初の「システム管理者感謝の日」
14LastDay    = datetime.date(2200, 12, 31)
15
16while LastDay > d:
17   if d.month == 7 :   # 7月 で、金曜日であれば、その日を記録する。
18      if d.weekday() == 4 :   # 0 : 月曜日, 1 : 火曜日, 2 : 水曜日, 3 : 木曜日, 4 : 金曜日, 5 : 土曜日, 6 : 日曜日
19         LastFriday = d
20   if d.month == 8 :   # 8月 になった時点で、記録されている日が7月最後の金曜日
21      if None != LastFriday:
22         print(LastFriday.strftime("%Y-%m-%d %A"))
23         LastFriday = None         # この変数を初期化して、次の年の「システム管理者感謝の日」に備える。
24   d = d + datetime.timedelta(days=1)

実行方法

スクリプトの実行方法は、以下のとおりです。

> python checkSAD.py

実行結果

  12000-07-28 Friday
  22001-07-27 Friday
  32002-07-26 Friday
  42003-07-25 Friday
  52004-07-30 Friday
  62005-07-29 Friday
  72006-07-28 Friday
  82007-07-27 Friday
  92008-07-25 Friday
 102009-07-31 Friday
 112010-07-30 Friday
 122011-07-29 Friday
 132012-07-27 Friday
 142013-07-26 Friday
 152014-07-25 Friday
 162015-07-31 Friday
 172016-07-29 Friday
 182017-07-28 Friday
 192018-07-27 Friday
 202019-07-26 Friday
 212020-07-31 Friday
 222021-07-30 Friday
 232022-07-29 Friday
 242023-07-28 Friday
 252024-07-26 Friday
 262025-07-25 Friday
 272026-07-31 Friday
 282027-07-30 Friday
 292028-07-28 Friday
 302029-07-27 Friday
 312030-07-26 Friday
 322031-07-25 Friday
 332032-07-30 Friday
 342033-07-29 Friday
 352034-07-28 Friday
 362035-07-27 Friday
 372036-07-25 Friday
 382037-07-31 Friday
 392038-07-30 Friday
 402039-07-29 Friday
 412040-07-27 Friday
 422041-07-26 Friday
 432042-07-25 Friday
 442043-07-31 Friday
 452044-07-29 Friday
 462045-07-28 Friday
 472046-07-27 Friday
 482047-07-26 Friday
 492048-07-31 Friday
 502049-07-30 Friday
 512050-07-29 Friday
 522051-07-28 Friday
 532052-07-26 Friday
 542053-07-25 Friday
 552054-07-31 Friday
 562055-07-30 Friday
 572056-07-28 Friday
 582057-07-27 Friday
 592058-07-26 Friday
 602059-07-25 Friday
 612060-07-30 Friday
 622061-07-29 Friday
 632062-07-28 Friday
 642063-07-27 Friday
 652064-07-25 Friday
 662065-07-31 Friday
 672066-07-30 Friday
 682067-07-29 Friday
 692068-07-27 Friday
 702069-07-26 Friday
 712070-07-25 Friday
 722071-07-31 Friday
 732072-07-29 Friday
 742073-07-28 Friday
 752074-07-27 Friday
 762075-07-26 Friday
 772076-07-31 Friday
 782077-07-30 Friday
 792078-07-29 Friday
 802079-07-28 Friday
 812080-07-26 Friday
 822081-07-25 Friday
 832082-07-31 Friday
 842083-07-30 Friday
 852084-07-28 Friday
 862085-07-27 Friday
 872086-07-26 Friday
 882087-07-25 Friday
 892088-07-30 Friday
 902089-07-29 Friday
 912090-07-28 Friday
 922091-07-27 Friday
 932092-07-25 Friday
 942093-07-31 Friday
 952094-07-30 Friday
 962095-07-29 Friday
 972096-07-27 Friday
 982097-07-26 Friday
 992098-07-25 Friday
1002099-07-31 Friday
1012100-07-30 Friday
1022101-07-29 Friday
1032102-07-28 Friday
1042103-07-27 Friday
1052104-07-25 Friday
1062105-07-31 Friday
1072106-07-30 Friday
1082107-07-29 Friday
1092108-07-27 Friday
1102109-07-26 Friday
1112110-07-25 Friday
1122111-07-31 Friday
1132112-07-29 Friday
1142113-07-28 Friday
1152114-07-27 Friday
1162115-07-26 Friday
1172116-07-31 Friday
1182117-07-30 Friday
1192118-07-29 Friday
1202119-07-28 Friday
1212120-07-26 Friday
1222121-07-25 Friday
1232122-07-31 Friday
1242123-07-30 Friday
1252124-07-28 Friday
1262125-07-27 Friday
1272126-07-26 Friday
1282127-07-25 Friday
1292128-07-30 Friday
1302129-07-29 Friday
1312130-07-28 Friday
1322131-07-27 Friday
1332132-07-25 Friday
1342133-07-31 Friday
1352134-07-30 Friday
1362135-07-29 Friday
1372136-07-27 Friday
1382137-07-26 Friday
1392138-07-25 Friday
1402139-07-31 Friday
1412140-07-29 Friday
1422141-07-28 Friday
1432142-07-27 Friday
1442143-07-26 Friday
1452144-07-31 Friday
1462145-07-30 Friday
1472146-07-29 Friday
1482147-07-28 Friday
1492148-07-26 Friday
1502149-07-25 Friday
1512150-07-31 Friday
1522151-07-30 Friday
1532152-07-28 Friday
1542153-07-27 Friday
1552154-07-26 Friday
1562155-07-25 Friday
1572156-07-30 Friday
1582157-07-29 Friday
1592158-07-28 Friday
1602159-07-27 Friday
1612160-07-25 Friday
1622161-07-31 Friday
1632162-07-30 Friday
1642163-07-29 Friday
1652164-07-27 Friday
1662165-07-26 Friday
1672166-07-25 Friday
1682167-07-31 Friday
1692168-07-29 Friday
1702169-07-28 Friday
1712170-07-27 Friday
1722171-07-26 Friday
1732172-07-31 Friday
1742173-07-30 Friday
1752174-07-29 Friday
1762175-07-28 Friday
1772176-07-26 Friday
1782177-07-25 Friday
1792178-07-31 Friday
1802179-07-30 Friday
1812180-07-28 Friday
1822181-07-27 Friday
1832182-07-26 Friday
1842183-07-25 Friday
1852184-07-30 Friday
1862185-07-29 Friday
1872186-07-28 Friday
1882187-07-27 Friday
1892188-07-25 Friday
1902189-07-31 Friday
1912190-07-30 Friday
1922191-07-29 Friday
1932192-07-27 Friday
1942193-07-26 Friday
1952194-07-25 Friday
1962195-07-31 Friday
1972196-07-29 Friday
1982197-07-28 Friday
1992198-07-27 Friday
2002199-07-26 Friday
2012200-07-25 Friday
2022201-07-31 Friday
2032202-07-30 Friday
2042203-07-29 Friday
2052204-07-27 Friday
2062205-07-26 Friday
2072206-07-25 Friday
2082207-07-31 Friday
2092208-07-29 Friday
2102209-07-28 Friday
2112210-07-27 Friday
2122211-07-26 Friday
2132212-07-31 Friday
2142213-07-30 Friday
2152214-07-29 Friday
2162215-07-28 Friday
2172216-07-26 Friday
2182217-07-25 Friday
2192218-07-31 Friday
2202219-07-30 Friday
2212220-07-28 Friday
2222221-07-27 Friday
2232222-07-26 Friday
2242223-07-25 Friday
2252224-07-30 Friday
2262225-07-29 Friday
2272226-07-28 Friday
2282227-07-27 Friday
2292228-07-25 Friday
2302229-07-31 Friday
2312230-07-30 Friday
2322231-07-29 Friday
2332232-07-27 Friday
2342233-07-26 Friday
2352234-07-25 Friday
2362235-07-31 Friday
2372236-07-29 Friday
2382237-07-28 Friday
2392238-07-27 Friday
2402239-07-26 Friday
2412240-07-31 Friday
2422241-07-30 Friday
2432242-07-29 Friday
2442243-07-28 Friday
2452244-07-26 Friday
2462245-07-25 Friday
2472246-07-31 Friday
2482247-07-30 Friday
2492248-07-28 Friday
2502249-07-27 Friday
2512250-07-26 Friday
2522251-07-25 Friday
2532252-07-30 Friday
2542253-07-29 Friday
2552254-07-28 Friday
2562255-07-27 Friday
2572256-07-25 Friday
2582257-07-31 Friday
2592258-07-30 Friday
2602259-07-29 Friday
2612260-07-27 Friday
2622261-07-26 Friday
2632262-07-25 Friday
2642263-07-31 Friday
2652264-07-29 Friday
2662265-07-28 Friday
2672266-07-27 Friday
2682267-07-26 Friday
2692268-07-31 Friday
2702269-07-30 Friday
2712270-07-29 Friday
2722271-07-28 Friday
2732272-07-26 Friday
2742273-07-25 Friday
2752274-07-31 Friday
2762275-07-30 Friday
2772276-07-28 Friday
2782277-07-27 Friday
2792278-07-26 Friday
2802279-07-25 Friday
2812280-07-30 Friday
2822281-07-29 Friday
2832282-07-28 Friday
2842283-07-27 Friday
2852284-07-25 Friday
2862285-07-31 Friday
2872286-07-30 Friday
2882287-07-29 Friday
2892288-07-27 Friday
2902289-07-26 Friday
2912290-07-25 Friday
2922291-07-31 Friday
2932292-07-29 Friday
2942293-07-28 Friday
2952294-07-27 Friday
2962295-07-26 Friday
2972296-07-31 Friday
2982297-07-30 Friday
2992298-07-29 Friday
3002299-07-28 Friday
3012300-07-27 Friday
3022301-07-26 Friday
3032302-07-25 Friday
3042303-07-31 Friday
3052304-07-29 Friday
3062305-07-28 Friday
3072306-07-27 Friday
3082307-07-26 Friday
3092308-07-31 Friday
3102309-07-30 Friday
3112310-07-29 Friday
3122311-07-28 Friday
3132312-07-26 Friday
3142313-07-25 Friday
3152314-07-31 Friday
3162315-07-30 Friday
3172316-07-28 Friday
3182317-07-27 Friday
3192318-07-26 Friday
3202319-07-25 Friday
3212320-07-30 Friday
3222321-07-29 Friday
3232322-07-28 Friday
3242323-07-27 Friday
3252324-07-25 Friday
3262325-07-31 Friday
3272326-07-30 Friday
3282327-07-29 Friday
3292328-07-27 Friday
3302329-07-26 Friday
3312330-07-25 Friday
3322331-07-31 Friday
3332332-07-29 Friday
3342333-07-28 Friday
3352334-07-27 Friday
3362335-07-26 Friday
3372336-07-31 Friday
3382337-07-30 Friday
3392338-07-29 Friday
3402339-07-28 Friday
3412340-07-26 Friday
3422341-07-25 Friday
3432342-07-31 Friday
3442343-07-30 Friday
3452344-07-28 Friday
3462345-07-27 Friday
3472346-07-26 Friday
3482347-07-25 Friday
3492348-07-30 Friday
3502349-07-29 Friday
3512350-07-28 Friday
3522351-07-27 Friday
3532352-07-25 Friday
3542353-07-31 Friday
3552354-07-30 Friday
3562355-07-29 Friday
3572356-07-27 Friday
3582357-07-26 Friday
3592358-07-25 Friday
3602359-07-31 Friday
3612360-07-29 Friday
3622361-07-28 Friday
3632362-07-27 Friday
3642363-07-26 Friday
3652364-07-31 Friday
3662365-07-30 Friday
3672366-07-29 Friday
3682367-07-28 Friday
3692368-07-26 Friday
3702369-07-25 Friday
3712370-07-31 Friday
3722371-07-30 Friday
3732372-07-28 Friday
3742373-07-27 Friday
3752374-07-26 Friday
3762375-07-25 Friday
3772376-07-30 Friday
3782377-07-29 Friday
3792378-07-28 Friday
3802379-07-27 Friday
3812380-07-25 Friday
3822381-07-31 Friday
3832382-07-30 Friday
3842383-07-29 Friday
3852384-07-27 Friday
3862385-07-26 Friday
3872386-07-25 Friday
3882387-07-31 Friday
3892388-07-29 Friday
3902389-07-28 Friday
3912390-07-27 Friday
3922391-07-26 Friday
3932392-07-31 Friday
3942393-07-30 Friday
3952394-07-29 Friday
3962395-07-28 Friday
3972396-07-26 Friday
3982397-07-25 Friday
3992398-07-31 Friday
4002399-07-30 Friday
4012400-07-28 Friday
4022401-07-27 Friday
4032402-07-26 Friday
4042403-07-25 Friday
4052404-07-30 Friday
4062405-07-29 Friday
4072406-07-28 Friday
4082407-07-27 Friday
4092408-07-25 Friday
4102409-07-31 Friday
4112410-07-30 Friday
4122411-07-29 Friday
4132412-07-27 Friday
4142413-07-26 Friday
4152414-07-25 Friday
4162415-07-31 Friday
4172416-07-29 Friday
4182417-07-28 Friday
4192418-07-27 Friday
4202419-07-26 Friday
4212420-07-31 Friday
4222421-07-30 Friday
4232422-07-29 Friday
4242423-07-28 Friday
4252424-07-26 Friday
4262425-07-25 Friday
4272426-07-31 Friday
4282427-07-30 Friday
4292428-07-28 Friday
4302429-07-27 Friday
4312430-07-26 Friday
4322431-07-25 Friday
4332432-07-30 Friday
4342433-07-29 Friday
4352434-07-28 Friday
4362435-07-27 Friday
4372436-07-25 Friday
4382437-07-31 Friday
4392438-07-30 Friday
4402439-07-29 Friday
4412440-07-27 Friday
4422441-07-26 Friday
4432442-07-25 Friday
4442443-07-31 Friday
4452444-07-29 Friday
4462445-07-28 Friday
4472446-07-27 Friday
4482447-07-26 Friday
4492448-07-31 Friday
4502449-07-30 Friday
4512450-07-29 Friday
4522451-07-28 Friday
4532452-07-26 Friday
4542453-07-25 Friday
4552454-07-31 Friday
4562455-07-30 Friday
4572456-07-28 Friday
4582457-07-27 Friday
4592458-07-26 Friday
4602459-07-25 Friday
4612460-07-30 Friday
4622461-07-29 Friday
4632462-07-28 Friday
4642463-07-27 Friday
4652464-07-25 Friday
4662465-07-31 Friday
4672466-07-30 Friday
4682467-07-29 Friday
4692468-07-27 Friday
4702469-07-26 Friday
4712470-07-25 Friday
4722471-07-31 Friday
4732472-07-29 Friday
4742473-07-28 Friday
4752474-07-27 Friday
4762475-07-26 Friday
4772476-07-31 Friday
4782477-07-30 Friday
4792478-07-29 Friday
4802479-07-28 Friday
4812480-07-26 Friday
4822481-07-25 Friday
4832482-07-31 Friday
4842483-07-30 Friday
4852484-07-28 Friday
4862485-07-27 Friday
4872486-07-26 Friday
4882487-07-25 Friday
4892488-07-30 Friday
4902489-07-29 Friday
4912490-07-28 Friday
4922491-07-27 Friday
4932492-07-25 Friday
4942493-07-31 Friday
4952494-07-30 Friday
4962495-07-29 Friday
4972496-07-27 Friday
4982497-07-26 Friday
4992498-07-25 Friday
5002499-07-31 Friday
5012500-07-30 Friday