Moon and Moon Phase

Platform: API iOS Android

Get moonrise and moonset and hourly moon phase data for the next 60 days at any location worldwide.

Interface Code Interface Class
getMoon Moonrise, moonset and moon phase data MoonBean

Parameter

  • location(required)The location to be queried, support LocationID or comma-separated longitude and latitude (decimal, up to 2 decimal places), LocationID can be obtained by GeoAPI. Example: location=101010100 or location=116.41,39.92
  • date(required)Set the date, up to 60 days in the future (including today). The date format is yyyyMMdd. Example: date=20200531

Sample Code

QWeather.getMoon(Context context, String location, String date, final OnResultMoonListener listener) ;

QWeather.getMoon(Context context, String location, Lang lang, String date, final OnResultMoonListener listener)                                

Properties

Properties of MoonBean

Property Description Example
getCode See Status Code 200
getRefer Reference data, includes data source, statements and license Refer
getMoonrise Moonrise time of current day. Maybe null 2017-10-25T01:34+08:00
getMoonset Moonset time of current day. Maybe null 2017-10-25T04:34+08:00
getMoonPhaseBeanList Moon phase data List<MoonPhaseBean>

Refer

Property Description Example
getSourcesList Data source and other statements QWeather
getLicenseList Data license QWeather Developers License

Basic

Property Description Example
getUpdateTime Last updated time 2017-10-25T04:34+08:00
getFxLink Responsive web page of this location, easy to embed in your website or APP https://www.qweather.com/weather/beijing-101010100.html

MoonPhaseBean

Property Description Example
getFxTime Moon phase forecast time 2013-12-31T23:31+08:00
getValue Moon phase value 0.25
getName Moon Phase Name 上弦月
getIllumination Moon illuminance in percent 30
getIcon Icon code for moon phase. See also QWeather Icons 802