5,838
edits
m (→Use of spaces: Now rewritten whole section, as decided to add examples) |
m (→Migrating from legacy to MX: simplified) |
||
Line 722: | Line 722: | ||
== Migrating | == Migrating from legacy Cumulus 1 to MX== | ||
If you | If you have created any legacy cumulus template files, then in each template, you will need to do some editing. Everywhere a web tag appears with an output modifiers that is used to specify a date and/or time format, has to be edited before that template will work for MX. | ||
Here are the main reasons: | |||
* the reserved characters are different in C1 and MX (affecting use of literals like "on" and "at" that appear in many English time-stamps) | * the reserved characters are different in C1 and MX (affecting use of literals like "on" and "at" that appear in many English time-stamps) | ||
* the Delphi in legacy Cumulus is case insensitive, so for example "H" and "h" have the same meaning | |||
* MX is case sensitive, and symbols mostly have different meanings when one symbol is used to when that symbol is used with others, so for example "H" and "h" have different meanings, and if not used with other symbols will need to be preceded with a "%" to have same meaning as they have in combination with other symbols | |||
* In the legacy cumulus, a symbol like "d" has the same meaning for any tag | |||
* MX is inconsistent, a symbol like "d" changes its meaning depending on the tag it is used with (e.g. the script conditional ''''<#metdateyesterday format=d>' == '<#yesterday format=d)>'''' will never be equal as the LHS returns a full date and the right hand side returns day of month only) | |||
* the symbols used for representing such modifiers as minutes, month, am/pm, are different between C1 and MX. | |||
* MX introduces the concept of escaping characters (a '''\''' placed before a character can be either a control sequence or an instruction to display the character) | * MX introduces the concept of escaping characters (a '''\''' placed before a character can be either a control sequence or an instruction to display the character) | ||
* | * In the legacy Cumulus, a space is a gap between characters | ||
* | * In MX, a space must be within a literal, as a space before a symbol has the same effect as "%", (it changes the interpretation of a modifier character). | ||
'''Confused even more now?''' I'm not surprised, but maybe some examples will help | '''Confused even more now?''' I'm not surprised, but maybe some examples will help. | ||
=== Examples === | === Examples === | ||
Line 755: | Line 760: | ||
** but alternatively you can escape each verbatim character with a backslash as prefix (Cumulus MX). | ** but alternatively you can escape each verbatim character with a backslash as prefix (Cumulus MX). | ||
* You may need to use both single quotes and back slashes in some format specifiers, depending whether the characters you want to include can be interpreted as control characters (yes, backslash is also used to escape control characters, so backslash will NOT work for some characters such as those in "on" and "at" [\n will produce new line not the letter n, \t will produce a tab not the letter t]), consequently for some characters you must use the literal approach to include them in your format. | * You may need to use both single quotes and back slashes in some format specifiers, depending whether the characters you want to include can be interpreted as control characters (yes, backslash is also used to escape control characters, so backslash will NOT work for some characters such as those in "on" and "at" [\n will produce new line not the letter n, \t will produce a tab not the letter t]), consequently for some characters you must use the literal approach to include them in your format. | ||
== Past history for this page== | == Past history for this page== |
edits