Vim documentation: vital/Geo/Sun
main help file
vital/Geo/Sun.txt Utilities for Sunset/Sunrize and other
Maintainer: Tsuyoshi CHO <Tsuyoshi.CHO+develop@Gmail.com>
==============================================================================
CONTENTS Vital.Geo.Sun-contents
INTRODUCTION Vital.Geo.Sun-introduction
FUNCTIONS Vital.Geo.Sun-functions
OBJECTS Vital.Geo.Sun-objects
Sun Object Vital.Geo.Sun-objects-Sun
==============================================================================
INTRODUCTION Vital.Geo.Sun-introduction
Vital.Geo.Sun is a library that is sunset/sunrise and others time of day.
Sunset and sunrise times for any location - Free calendars and calculator:
https://sunrise-sunset.org/
==============================================================================
FUNCTIONS Vital.Geo.Sun-functions
new([{client}]) Vital.Geo.Sun.new()
Creates a new Sun object.
If {client} specified, overwrite inner HTTP settings.
{client} is a List same as Vital.Web.HTTP.request() - {settings} -
"client" parameter.
==============================================================================
OBJECTS Vital.Geo.Sun-objects
------------------------------------------------------------------------------
Sun Object Vital.Geo.Sun-objects-Sun
Sun object has the following data after resolving the API request/response
process.
This object has below:
- status : v:null(unresolved) or v:false(failure) or v:true(success)
- result : see below
- json : raw response json data.
result data is:
- sunrise : Vital.DateTime-DateTime object
- sunset : Vital.DateTime-DateTime object
- solar_noon : Vital.DateTime-DateTime object
- day_length : Vital.DateTime-TimeDelta object
- twilight
- civil
-begin : Vital.DateTime-DateTime object
-end : Vital.DateTime-DateTime object
- nautical
- begin : Vital.DateTime-DateTime object
- end : Vital.DateTime-DateTime object
- astronomical
- begin : Vital.DateTime-DateTime object
- end : Vital.DateTime-DateTime object
Vital.Geo.Sun-Sun.resolve()
{sun}.resolve({longitude}, {latitude}, [{date}])
Resolve sunset/sunrise at {longitude}, {latitude}.
If add {date} at Vital.DateTime-DateTime object, resolve target
{date}'s sunset/sunrize.
Vital.Geo.Sun-Sun.resolveAsync()
{sun}.resolveAsync({longitude}, {latitude}, [{date}])
Resolve sunset/sunrise at {longitude}, {latitude}.
If add {date} at Vital.DateTime-DateTime object, resolve target
{date}'s sunset/sunrize.
This function return Vital.Async.Promise object.
If it is resolved. promise is resolved status and chain method call
with args at {sun} object.
e.g.:
let promise = sun.resolveAsync(long,lat)
call promise.then({ sun -> foo(sun) })
call s:Promise.wait(promise)
" Wait for complete reolving. and process then lambda.
==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl
top - main help file - tag index