Jump to content

Day of year


myspacee
 Share

Recommended Posts

wonderfull

here a version with user parameter :

#include <Date.au3>

Dim $Day1 = @YEAR & "/01/01"

If $CmdLine[0] = 0 Then

    $Days = _DateDiff("D", $Day1, _NowCalcDate() )
    ConsoleWrite($Days)
    
ElseIf $CmdLine[0] = 1 Then
    
    $Days = _DateDiff("D", $Day1, _NowCalcDate() ) + $CmdLine[1]
    
    if $Days > 365 then 
        $Days = $Days - 365
    endif
    ConsoleWrite($Days)
    
EndIf

if doy > 365 remove 365 and obtain doy of next year, but doesn't work

can anyone correct it ?

m.

Edited by myspacee
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...