sunrise

Top  Previous  Next

Calculate the sunrise time.

Definition

sunrise = scheduler.sunrise( latitude, longitude, [date], [timezone] )

Name

Type

Description

sunrise

Date Object

Date and Time of sunrise.

date

Date Object

Optional date object specifying the day you wish to get the sunrise time for.

latitude

number

latitude to calculate for

longitude

number

longitude to calculate for

timezone

number

the timezone the lat/long is in.

Example

local sunrise = scheduler.sunrise( gir.settings().latitude, gir.settings().longitude, date.now(),date.utcOffset( ) )

print(sunrise)

 

prints:

Fri Mar 1 06:44:00 2013

Availability

Lua