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

"प्रयोगशाला" के अवतरणों में अंतर

Kavita Kosh से
यहाँ जाएँ: भ्रमण, खोज
पंक्ति 14: पंक्ति 14:
 
|}
 
|}
  
{{#vardefine:birthdate|14 अगस्त}}
+
 
 +
<!--define variable containing birth date provided by user. For Example: 14 अगस्त 1907-->
 +
{{#vardefine:birthdate|{{{जन्म|}}}}}
 +
<!--Calculate length of the birthdate string-->
 
{{#vardefine:birthdatelength|{{#len:{{#var:birthdate}}}}}}
 
{{#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}}}}
 
{{#vardefine:birthyear|{{#sub:{{#var:birthdate}}|{{#expr:{{#var:birthdatelength}}-4}}|0}}}}
{{#ifeq:{{#expr:{{#var:birthyear}}/{{#var:birthyear}}}}|1|{{#vardefine:yearIsNumeric|1}}}}
+
<!--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}}}}
{{#ifexpr:({{#var:birthdatelength}}>4) and ({{#var:yearIsNumeric}}==1)
+
<!--If birth year is numric -then extract rest of the characters as birth day (i.e. 14 अगस्त in the example we are taking)-->
|{{#vardefine:birthday|{{#sub:{{#var:birthdate}}|0|{{#expr:{{#var:birthdatelength}}-4}}}}}}
+
{{#ifeq:{{#var:yearIsNumeric}}|1|
 +
{{#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 अगस्त-->
 
+
{{#ifeq:{{#var:yearIsNumeric}}|0|
'''जन्मतिथि:''' {{#var:birthday}}<br>
+
{{#vardefine:birthday|{{#var:birthdate}}}}
'''जन्मवर्ष:''' {{#var:birthyear}}<br>
+
}}
 
+
<!--Assign category for birthday-->
 +
{{#ifeq:{{#var:yearIsNumeric}}|0|[[Category:जन्मतिथि: {{#var:birthday}}]]}}
 +
<!--Assign category for birth year-->
 
{{#ifeq:{{#var:yearIsNumeric}}|1|[[Category:जन्मवर्ष: {{#var:birthyear}}]]}}
 
{{#ifeq:{{#var:yearIsNumeric}}|1|[[Category:जन्मवर्ष: {{#var:birthyear}}]]}}

22:07, 14 अगस्त 2009 का अवतरण

प्रयोगो के लिये स्थान! आप इस पन्ने पर कोई भी प्रयोग कर सकते हैं। गलतियाँ होने का कोई डर नहीं। बस कोशिश कीजिये कि आप किसी दूसरे सदस्य के द्वारा लिखी गयी सामग्री को ना मिटायें।


रचनाएँ
कनक-रतनमय पालनो रच्यो मनहुँ मार-सुतहार / तुलसीदास
पालने रघुपति झुलावै / तुलसीदास
सुभग सेज सोभित कौसिल्या रुचिर राम-सिसु गोद लिये / तुलसीदास