AppleScript名:当日が1年の何週目かを求める.scptd |
— – Created by: Takaaki Naganoya – Created on: 2018/04/08 — – Copyright © 2018 Piyomaru Software, All Rights Reserved — use AppleScript version "2.4" — Yosemite (10.10) or later use framework "Foundation" use scripting additions set a1Unit to (current application’s NSWeekOfYearCalendarUnit) set a2Unit to (current application’s NSDayCalendarUnit) set a3Unit to (current application’s NSMonthCalendarUnit) set a4Unit to (current application’s NSYearCalendarUnit) set aCalendar to current application’s NSCalendar’s currentCalendar() set aComponent to aCalendar’s components:(a1Unit + a2Unit + a3Unit + a4Unit) fromDate:(current application’s NSDate’s |date|()) set aWN to aComponent’s weekOfYear() –> 15 |
More from my site
(Visited 41 times, 1 visits today)