Insert Date - macOS service to insert the date at the cursor.
-
Open the Xcode project and in the Info panel of the DateTime target change the
com.exampleprefix of the bundle Identifier fromcom.example.${PRODUCT_NAME:rfc1034identifier}to a domain you control. -
You may choose to adjust how the code is signed, but that isn't necessary.
-
Build from the Product menu
- from the Products group in Xcode's Product Navigator select
DateTime.serviceand right-click to Show in Finder In the Finder, put
DateTime.servicein yourLibrary/Servicesdirectory.
In any program that uses Apple's text system, place the cursor anywhere you can enter text. Choose Insert Date from Services submenu.
I bind this to ⌘⇧D so in a single compound keystroke I can enter the date.
The date format is controlled by the NSUserData in the Info.plist. As shipped, it is set to the American-style 7/11/2021, but any format string that is compatible with NSDateFormatter may be used.