תבנית:המרות/עונה לעונה הבאה: הבדלים בין גרסאות בדף
מתוך מכביפדיה
מ (Kosh העביר את הדף המרות/עונה לעונה הבאה לשם תבנית:המרות/עונה לעונה הבאה בלי להשאיר הפניה)
אין תקציר עריכה
 
(2 גרסאות ביניים של אותו משתמש אינן מוצגות)
שורה 3: שורה 3:
We find the first year (4 digits), increase it by 1 and complete the rest of the format (the second year with two digits, mod by 100)
We find the first year (4 digits), increase it by 1 and complete the rest of the format (the second year with two digits, mod by 100)
We use "padleft" because we might get results from "mod by 100" which are one digit only.
We use "padleft" because we might get results from "mod by 100" which are one digit only.
-->{{#vardefine: first_year|  {{#explode: 2005/06| /}} }}<!--
-->{{#vardefine: first_year|  {{#explode: {{{עונה}}}| /}} }}<!--


-->{{#expr: 1 + {{#var: first_year}} }}/{{padleft: {{#expr: (2 + {{#var: first_year}}) mod 100}}| 2| 0}}<!--
-->{{#expr: 1 + {{#var: first_year}} }}/{{padleft: {{#expr: (2 + {{#var: first_year}}) mod 100}}| 2| 0}}<!--
שורה 22: שורה 22:
פרמטרים:
פרמטרים:
* '''עונה''': העונה שאותה נקדם (בפורמט הנ"ל)
* '''עונה''': העונה שאותה נקדם (בפורמט הנ"ל)
שימוש לדוגמא:
<nowiki>{{המרות/עונה לעונה הבאה| עונה=2001/02}}</nowiki>
</poem>}}
</poem>}}


[[קטגוריה:המרות]]
[[קטגוריה: תבניות המרה]]
</noinclude>
</noinclude>

גרסה אחרונה מ־02:31, 24 בדצמבר 2020

הסבר על התבנית

 
תבנית זו ממירה את העונה שהתקבלה לעונה שאחריה, למשל עבור הקלט:
2005/06
יחזור הפלט:
2006/07

עונת 1998/99 תקודם ל: 1999/00.

פרמטרים:

  • עונה: העונה שאותה נקדם (בפורמט הנ"ל)


שימוש לדוגמא:
{{המרות/עונה לעונה הבאה| עונה=2001/02}}