sunset

Top  Previous  Next

Calculate the sunset time.

Definition

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

Name

Type

Description

sunset

Date Object

Date and Time of sunset.

date

Date Object

Optional date object specifying the day you wish to get the sunset 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 sunset = scheduler.sunset( gir.settings().latitude, gir.settings().longitude, date.now(),date.utcOffset( ) )

print(sunset)

 

prints:

Fri Mar 1 06:44:00 2013

Availability

Lua