Editing
MediaWiki Magic Word
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
MediaWiki 透過 [https://www.mediawiki.org/wiki/Help:Magic_words Magic Word] 回傳時間等變數。 如果下表「描述說明」沒有註明(伺服器設定),代表是[https://zh.wikipedia.org/zh-tw/%E5%8D%8F%E8%B0%83%E4%B8%96%E7%95%8C%E6%97%B6 世界協調時間] (UTC, [https://en.wikipedia.org/wiki/Coordinated_Universal_Time Coordinated Universal Time]),相當於是[https://zh.wikipedia.org/zh-tw/%E6%A0%BC%E6%9E%97%E5%B0%BC%E6%B2%BB%E5%B9%B3%E6%97%B6 格林威治標準時間] (GMT)。 <table style="border:1px solid #000"> <tr> <td>Magic Word 變數語法</td> <td>輸出結果</td> <td>描述說明</td> </tr> <tr><td colspan="3"> 年份 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTYEAR}}</nowiki> }}</td> <td>{{CURRENTYEAR}}</td> <td>年份</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALYEAR}}</nowiki> }}</td> <td>{{LOCALYEAR}}</td> <td>年份 (伺服器設定)</td> </tr> <tr><td colspan="3"> 月份 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTMONTH}}</nowiki> }}</td> <td>{{CURRENTMONTH}}</td> <td>月份, 如果只有一位數, 前面補零</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALMONTH}}</nowiki> }}</td> <td>{{LOCALMONTH}}</td> <td>月份, 如果只有一位數, 前面補零 (伺服器設定)</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTMONTH1}}</nowiki> }}</td> <td>{{CURRENTMONTH1}}</td> <td>月份, 如果只有一位數, 前面不補零</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALMONTH1}}</nowiki> }}</td> <td>{{LOCALMONTH1}}</td> <td>月份, 如果只有一位數, 前面不補零 (伺服器設定)</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTMONTHNAME}}</nowiki> }}</td> <td>{{CURRENTMONTHNAME}}</td> <td>月份名稱英文 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALMONTHNAME}}</nowiki> }}</td> <td>{{LOCALMONTHNAME}}</td> <td>月份名稱英文 (伺服器設定)</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTMONTHNAMEGEN}}</nowiki> }}</td> <td>{{CURRENTMONTHNAMEGEN}}</td> <td>月份名稱英文(genitive form) </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALMONTHNAMEGEN}}</nowiki> }}</td> <td>{{LOCALMONTHNAMEGEN}}</td> <td>月份名稱英文(genitive form) (伺服器設定)</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTMONTHABBREV}}</nowiki> }}</td> <td>{{CURRENTMONTHABBREV}}</td> <td>月份簡稱</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALMONTHABBREV}}</nowiki> }}</td> <td>{{LOCALMONTHABBREV}}</td> <td>月份簡稱 (伺服器設定)</td> </tr> <tr><td colspan="3"> 日期 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTDAY}}</nowiki> }}</td> <td>{{CURRENTDAY}}</td> <td>日期數字, 如果只有一位數, 前面不補零</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALDAY}}</nowiki> }}</td> <td>{{LOCALDAY}}</td> <td>日期數字, 如果只有一位數, 前面不補零 (伺服器設定)</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTDAY2}}</nowiki> }}</td> <td>{{CURRENTDAY2}}</td> <td>日期數字, 如果只有一位數, 前面補零</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALDAY2}}</nowiki> }}</td> <td>{{LOCALDAY2}}</td> <td>日期數字, 如果只有一位數, 前面補零 (伺服器設定)</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTDOW}}</nowiki> }}</td> <td>{{CURRENTDOW}}</td> <td>週幾數字。週日是 0、週六是 6。</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALDOW}}</nowiki> }}</td> <td>{{LOCALDOW}}</td> <td>週幾數字 (伺服器設定)</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTWEEK}}</nowiki> }}</td> <td>{{CURRENTWEEK}}</td> <td>週數,今年的第幾週 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALWEEK}}</nowiki> }}</td> <td>{{LOCALWEEK}}</td> <td>週數,今年的第幾週 (伺服器設定)</td> </tr> <tr><td colspan="3"> 時間 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTTIME}}</nowiki> }}</td> <td>{{CURRENTTIME}}</td> <td>24小時制時間 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALTIME}}</nowiki> }}</td> <td>{{LOCALTIME}}</td> <td>24小時制時間 (伺服器設定)</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTHOUR}}</nowiki> }}</td> <td>{{CURRENTHOUR}}</td> <td>小時, 如果只有一位數, 前面補零 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALHOUR}}</nowiki> }}</td> <td>{{LOCALHOUR}}</td> <td>小時, 如果只有一位數, 前面補零 (伺服器設定)</td> </tr> <tr><td colspan="3"> 其他 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALDAYNAME}}</nowiki> }}</td> <td>{{LOCALDAYNAME}}</td> <td>週幾英文名稱 (伺服器設定)</td> </tr> <tr> <td>{{kbd | key=<nowiki>{{CURRENTTIMESTAMP}}</nowiki> }}</td> <td>{{CURRENTTIMESTAMP}}</td> <td>時間標籤 </td> </tr> <tr> <td>{{kbd | key=<nowiki>{{LOCALTIMESTAMP}}</nowiki> }}</td> <td>{{LOCALTIMESTAMP}}</td> <td>時間標籤 (伺服器設定)</td> </tr> </table> 著作權聲明 * 本文件翻譯自 [https://www.mediawiki.org/wiki/Help:Magic_words Magic Word] 採用創用 CC 授權: [https://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike License] (中文版: [https://creativecommons.org/licenses/by-sa/3.0/tw/ Creative Commons — 姓名標示-相同方式分享 3.0 台灣 — CC BY-SA 3.0 TW]) reference: * [https://en.wikipedia.org/wiki/Genitive_case Genitive case - Wikipedia, the free encyclopedia] * [http://www.siao2.com/2012/01/05/10253370.aspx Improving genitive. Or not…. (part 5): You can’t make it sexier by giving it a Latin twist… | Sorting it all Out, v2!] [[Category:MediaWiki]]
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Kbd
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information