x

Main chapters

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. LimeSurvey Cloud - Quick start guide
  3. LimeSurvey CE - Installation
  4. How to design a good survey (Guide)
  5. Getting started
  6. LimeSurvey configuration
  7. Introduction - Surveys
  8. View survey settings
  9. View survey menu
  10. View survey structure
  11. Introduction - Questions
  12. Introduction - Question Groups
  13. Introduction - Surveys - Management
  14. Survey toolbar options
  15. Multilingual survey
  16. Quick start guide - ExpressionScript
  17. Advanced features
  18. General FAQ
  19. Troubleshooting
  20. Workarounds
  21. License
  22. Version change log
  23. Plugins - Advanced
 Actions

DateFunctions/ja: Difference between revisions

From LimeSurvey Manual

Bravehorse (talk | contribs)
Created page with "=メールテンプレートの使用例= 1000px"
Bravehorse (talk | contribs)
Created page with "* localize_date(date[, language = null]): 指定された言語のアンケートの日付書式に従って日付をフォーマットします。 ** 指定された日付は..."
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
ExpressionScriptエンジンが日付変数を処理するための関数:
ExpressionScriptエンジンが日付変数を処理するための関数:


* localize_date(date[, language = null]): Formats a date according to the Survey's date format for the specified language.
* localize_date(date[, language = null]): 指定された言語のアンケートの日付書式に従って日付をフォーマットします。
** 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.
** 指定された日付は"Y-m-d H:i:s"の形式にしなければなりません。これは、例えばTOKEN:VALIDFROM変数で使用されます。
** 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
** ローカライゼーションに使用される既定の言語は現在のセッションの言語となります。現在の言語がアンケートで定義されていない場合は、アンケートの基本言語が使用されます。メールテンプレートで使用する場合は、トークンの言語をパラメーターとして使用し、期待される言語を設定してください。例: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.
このプラグインは[[ExpressionManagerStart/ja]]プラグインを使用し、この関数を作成します。この2つの関数はJavaScriptは使用しておらず、完全にサーバで実行されます。アンケート実施中にこの関数を使用する場合、関数はアンケート参加者がアンケートを進めたときのみ実行されます。


{{Alert|これらの関数を使用する前に、[[Plugin_manager/ja#.E6.A6.82.E8.A6.81|プラグインマネージャー]]でプラグインを有効にする必要があります。}}
{{Alert|これらの関数を使用する前に、[[Plugin_manager/ja#.E6.A6.82.E8.A6.81|プラグインマネージャー]]でプラグインを有効にする必要があります。}}

Latest revision as of 14:39, 28 November 2022

 Hint: この機能は、バージョン5.X.Y以降で使用できます。


使い方

ExpressionScriptエンジンが日付変数を処理するための関数:

  • localize_date(date[, language = null]): 指定された言語のアンケートの日付書式に従って日付をフォーマットします。
    • 指定された日付は"Y-m-d H:i:s"の形式にしなければなりません。これは、例えばTOKEN:VALIDFROM変数で使用されます。
    • ローカライゼーションに使用される既定の言語は現在のセッションの言語となります。現在の言語がアンケートで定義されていない場合は、アンケートの基本言語が使用されます。メールテンプレートで使用する場合は、トークンの言語をパラメーターとして使用し、期待される言語を設定してください。例:TOKEN:LANGUAGE

このプラグインはExpressionManagerStart/jaプラグインを使用し、この関数を作成します。この2つの関数はJavaScriptは使用しておらず、完全にサーバで実行されます。アンケート実施中にこの関数を使用する場合、関数はアンケート参加者がアンケートを進めたときのみ実行されます。

  これらの関数を使用する前に、プラグインマネージャーでプラグインを有効にする必要があります。


ウェルカムメッセージの使用例

メールテンプレートの使用例