Php webtags: Difference between revisions

376 bytes added ,  09:57, 25 April 2020
m
mNo edit summary
Line 54: Line 54:
** Many ready-made scripts present both the "RC" and normal versions of such tags, they have to enclose all tags (even numeric ones) in quotes so the locale does not worry about format
** Many ready-made scripts present both the "RC" and normal versions of such tags, they have to enclose all tags (even numeric ones) in quotes so the locale does not worry about format
** Having numeric values in quotes makes it more difficult to do arithmetic with them, and may insert unwanted leading zeroes.
** Having numeric values in quotes makes it more difficult to do arithmetic with them, and may insert unwanted leading zeroes.
**If you are writing your own script, decide if you want to leave out quotes round web tags that always produce numeric output (not true for all that can produce numeric output, they might output '-' in some cases like first day of a month.


*Different locales may express dates differently
*Different locales may express dates differently
Line 59: Line 60:
**Many ready-made scripts are derived from one written assuming the USA date format is being used with month before day of month, and year last. Of course Cumulus actually outputs dates either in the format used by the locale selected or in the ISO format of year first with hyphens between date parts.
**Many ready-made scripts are derived from one written assuming the USA date format is being used with month before day of month, and year last. Of course Cumulus actually outputs dates either in the format used by the locale selected or in the ISO format of year first with hyphens between date parts.
** Check your choice of read-made script can cope with dates in the format you prefer.
** Check your choice of read-made script can cope with dates in the format you prefer.
**If you are writing your own script, decide what date format you want. It will look better if all dates on a page are in same format.


*Do you prefer 24-hour clock (some call this timetable format or military format) or 12 hour clock with am/pm?
*Do you prefer 24-hour clock (some call this timetable format or military format) or 12 hour clock with am/pm?
5,838

edits