DateFunctions/ja: Difference between revisions
From LimeSurvey Manual
Bravehorse (talk | contribs) Created page with "{{Alert|これらの関数を使用する前に、プラグインマネージャーでプラグインを有効にする必要があり..." |
Updating to match new version of source page |
||
Line 10: | Line 10: | ||
** The language used for localization defaults to current session language. If the current language is not configured in the survey, the survey base language will be used. When using in email templates, please use the token language as parameter as to set the expected language. Example: TOKEN:LANGUAGE | ** The language used for localization defaults to current session language. If the current language is not configured in the survey, the survey base language will be used. When using in email templates, please use the token language as parameter as to set the expected language. Example: TOKEN:LANGUAGE | ||
This plugin uses the [[ExpressionManagerStart]] plugin, and it creates this function. These 2 functions don't use JavaScript, so they are fully executed by the server. In case the function is used while taking a survey, the function will be executed only when the respondent moves ahead in the survey. | |||
{{Alert|これらの関数を使用する前に、[[Plugin_manager/ja#.E6.A6.82.E8.A6.81|プラグインマネージャー]]でプラグインを有効にする必要があります。}} | |||
<div class="mw-translate-fuzzy"> | |||
[[File:DateFunctions-LocalizeDate Sample.png]] | [[File:DateFunctions-LocalizeDate Sample.png]] | ||
</div> | |||
=Usage Example on Email Template= | |||
[[File:DateFunctions-LocalizeDate Sample.png|1000px]] | |||
[[Category:Plugins]][[Category:Core Plugins]] | [[Category:Plugins]][[Category:Core Plugins]] |
Revision as of 14:54, 27 November 2022
使い方
ExpressionScriptエンジンが日付変数を処理するための関数:
- localize_date(date[, language = null]): Formats a date according to the Survey's date format for the specified language.
- The date given should follow the following format "Y-m-d H:i:s", which is for example the one used by the TOKEN:VALIDFROM variable.
- The language used for localization defaults to current session language. If the current language is not configured in the survey, the survey base language will be used. When using in email templates, please use the token language as parameter as to set the expected language. Example: TOKEN:LANGUAGE
This plugin uses the ExpressionManagerStart plugin, and it creates this function. These 2 functions don't use JavaScript, so they are fully executed by the server. In case the function is used while taking a survey, the function will be executed only when the respondent moves ahead in the survey.
