use AppleScript version "2.5" -- requires 10.11
use scripting additions
use framework "Foundation"
its fullwidthStringForDate:(current date)
on transformFullwidthAndHalfwidth:aString toFull:fullFlag
set aString to current application's NSMutableString's stringWithString:aString
aString's applyTransform:(current application's NSStringTransformFullwidthToHalfwidth) |reverse|:fullFlag range:{0, aString's |length|()} updatedRange:(missing value)
return aString as text
end transformFullwidthAndHalfwidth:toFull:
on fullwidthStringForDate:aDate
set theFormatter to current application's NSDateFormatter's alloc()'s init()
theFormatter's setDateFormat:"yyyy年 M月 d日"
set dateString to theFormatter's stringFromDate:aDate
return (my transformFullwidthAndHalfwidth:dateString toFull:true) as text
end fullwidthStringForDate:
And for 10.9 or 10.10, you can do something similar using BridgePlus:
use AppleScript version "2.3.1"
use scripting additions
use bridgePlus : script "BridgePlus"
its fullwidthStringForDate:(current date)
on transformFullwidthAndHalfwidth:aString toFull:fullFlag
return bridgePlus's transformedFrom:aString ICUTransform:"Fullwidth-Halfwidth" inverse:fullFlag
end transformFullwidthAndHalfwidth:toFull:
on fullwidthStringForDate:aDate
set dateStrings to bridgePlus's stringsFromDates:{aDate} inFormat:"yyyy年 M月 d日"
return my transformFullwidthAndHalfwidth:(item 1 of dateStrings) toFull:true
end fullwidthStringForDate:
You can't really have too many options...