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 city to be queried, support LocationID or comma-separated longitude and latitude (decimal, up to 2 decimal places), LocationID can be obtained by GeoAPI.
  • 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 Status code, please refer to Status Code Code
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.com
getLicenseList Data license commercial 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 http://hfx.link/ae45

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, free to download QWeather Icons 802