Template:Years or months ago
外观
用法
[编辑]{{Years or months ago|年份|月}}
{{Years or months ago|年份}}
兩個時間之間:
{{Years or months ago|年份1|月1|年份2|月2}}
例子
[编辑]年和月
[编辑]模板 | 效果 |
---|---|
{{Years or months ago|2022|8}}
|
2年前 |
{{Years or months ago|2023|8}}
|
1年前 |
{{Years or months ago|2024|6}}
|
2月前 |
{{Years or months ago|2024|7}}
|
1月前 |
{{Years or months ago|2024|8}}
|
0月前 |
{{Years or months ago|2024|9}}
|
1月後 |
{{Years or months ago|2024|10}}
|
2月後 |
{{Years or months ago|2025|8}}
|
1年後 |
{{Years or months ago|2026|8}}
|
2年後 |
僅顯示年
[编辑]模板 | 效果 |
---|---|
{{Years or months ago|2022}}
|
2年前 |
{{Years or months ago|2023}}
|
1年前 |
{{Years or months ago|2024}}
|
0年前 |
{{Years or months ago|2025}}
|
1年後 |
{{Years or months ago|2026}}
|
2年後 |
參見
[编辑]- Template:Time ago – displays elapsed time (with same singular or plural text as this template)
- Template:Age – displays elapsed time in years (number only, future dates generate negative number)
上述文档嵌入自Template:Years or months ago/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |