![]() |
![]() |
![]() |
Help: Date, Time, and Math MacrosDate / Time SnippetsCreate a date or time snippet using the Insert menu
How date / time snippets work TextExpander allows you to create snippets which expand the current time and date. These types of snippets use special codes (macros) to do so, and are easily customizable. For example, TextExpander comes with a sample snippet, “ddate”, for the current date. Type the abbreviation, “ddate”, and the current date will appear like this : January 3, 2012 (assuming this is the current date). Each portion of the date is represented by a percentage sign and letter combination (macro), each of which stands for a particular format for showing Month, Day, and Year. In order to change a given date format, change the macros involved and their order. For example: For this date format “January 3, 2012”, where Month is a word, Day is a number, and Year is a number, use these characters “%B %e, %Y”. For this date format “12-01-03”, where Year is a number, Month is a number, and Day is a number, use these characters “%y-%m-%d”. The following is a list of macros that can be used in TextExpander in date and time snippets:
*Note the codes for 12-hour clock use a capital letter i
(where <Unicode Date Format> is defined here: http://unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns) Date / Time MathMake a snippet to show a past or future date or time using math macros. This involves placing a math macro directly in front of a date or time macro. Date/time macros are explained above. For example, say you are in the Accounts Receivable department and routinely need to remind people to pay you in 15 days time. You can create a date snippet that will always expand to a date 15 days in the future. Create a snippet using date / time math:
Here is a list of the math macros used in TextExpander:
To subtract the value instead of add, change the plus “+” to minus “-”. To change the amount of value, change the “1” to another number. Date and time math macros are not cumulative. Date and time math macros apply to all subsequent date and time formats. If another date and time math macro appears in a snippet, it replaces the previous date and time math macro. For example, assuming it is now September 2013: "One year from now: %@+1Y%Y, more specifically %B, %Y. Two years from now: %@+2Y%Y." expands to "One year from now: 2014, more specifically September, 2014. Two years from now: 2015." For more information on special characters and macros used in TextExpander, see Advanced Snippet Functions: Macros. |
||
© 2006-2014 SmileOnMyMac, LLC, dba Smile. All rights reserved. TextExpander is a registered trademark, Smile and the Smile logo are trademarks of SmileOnMyMac, LLC, dba Smile. |