![]() |
![]() |
![]() |
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: %@+1Y = Add Year(s) %@+1M = Add Month(s) %@+1D = Add Day(s) %@+1h = Add Hour(s) %@+1m = Add Minute(s) %@+1s = Add Second(s) To subtract the value instead of add, change the plus “+” to minus “-”. To change the amount of value, change the “1” to another number. Los macros matemáticos de fecha y hora no son acumulativos. Macros matemáticos de fecha y hora se aplican a todos los formatos subsiguientes de fecha y hora. Si aparece otro macro matemático de fecha y hora en un fragmento, reemplaza el previo macro matemático de fecha y hora. Si suponemos por ejemplo que hoy es Septiembre 2013: "Un año a partir de hoy: %@+1Y%Y, más específicamente %B, %Y. Dos años a partir de hoy: %@+2Y%Y." expande a "Un año a partir de hoy: 2014, más específicamente Septiembre 2013. Dos años a partir de hoy: 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. |