Browse Source

r.sun manual: how to get day of year using Python

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59291 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 years ago
parent
commit
393f0dd9ec
1 changed files with 6 additions and 0 deletions
  1. 6 0
      raster/r.sun/r.sun.html

+ 6 - 0
raster/r.sun/r.sun.html

@@ -290,6 +290,12 @@ d.rast.leg b172
 d.rast.leg it172
 </pre></div>
 
+We can compute the day of year from a specific date in Python shell:
+<div class="code"><pre>
+>>> import datetime
+>>> datetime.datetime(2014, 6, 21).timetuple().tm_yday
+172
+</pre></div>
 
 <h2>SEE ALSO</h2>