Explorar o código

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á %!s(int64=11) %!d(string=hai) anos
pai
achega
393f0dd9ec
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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>