भारत की संस्कृति के लिए... भाषा की उन्नति के लिए... साहित्य के प्रसार के लिए

Changes

Kavita Kosh से
यहाँ जाएँ: भ्रमण, खोज

प्रयोगशाला

308 bytes added, 05:50, 15 अगस्त 2009
|[[सुभग सेज सोभित कौसिल्या रुचिर राम-सिसु गोद लिये / तुलसीदास]]
|}
 
 
<!--define variable containing birth date provided by user. For Example: 14 अगस्त 1907-->
{{#vardefine:birthdate|{{{जन्म|}}}14 अगस्त 1907}}
<!--Calculate length of the birthdate string-->
{{#vardefine:birthdatelength|{{#len:{{#var:birthdate}}}}}}
<!--Extract last 4 characters from birthdate string. These 4 characters should ideally be birth year. For example 1907-->
{{#vardefine:birthyear|{{#sub:{{#var:birthdate}}|{{#expr:{{#var:birthdatelength}}-4}}|0}}}}
<!--If the last 4 characters are really birth year then these should be numeric. Check this.-->
{{#ifeq:{{#expr:{{#var:birthyear}}/{{#var:birthyear}}}}|1|{{#vardefine:yearIsNumeric|1}}|{{#vardefine:yearIsNumeric|0}}}}
<!--If birth year is numric -then extract rest of the characters as birth day (i.e. 14 अगस्त in the example we are taking)-->
{{#ifeq:{{#var:yearIsNumeric}}|1|
{{#ifeq:{{#var:birthdatelength}}|4||
{{#vardefine:birthday|{{#sub:{{#var:birthdate}}|0|{{#expr:{{#var:birthdatelength}}-4}}}}}}
}}
}}
<!--If birth year is not numeric -assign the entire string provided by the user as birth day. For example: 14 अगस्त-->
{{#vardefine:birthday|{{#var:birthdate}}}}
}}
<!--Assign category for birthdaycategories-->{{#ifeq:{{#var:yearIsNumericbirthdatelength}}|0||{{#ifeq:{{#len:{{#var:birthday}}}}|0||[[Category:जन्मतिथि: {{#var:birthday}}को जन्म]]}}<!--Assign category for birth year-->{{#ifeq:{{#var:yearIsNumeric}}|1|{{#vardefine:decadeStart|{{#expr:{{#var:birthyear}} - ({{#expr:{{#expr:{{#var:birthyear}} mod 10}}}})}}}}{{#vardefine:decadeEnd|{{#expr:{{#var:birthyear}} + ({{#expr:{{#expr:9 - ({{#var:birthyear}} mod 10)}}}})}}}}[[Category:जन्मवर्ष: {{#var:birthyear}}में जन्म]][[Category:दशक {{#var:decadeStart}}-{{#var:decadeEnd}}]]}}}}