Pebble App Framework
v4.6.0
How It Works
CLI
Device API
Phone API
C Coverage
TS Coverage
GitHub
Theme
Pebble App Framework: Device API
Toggle main menu visibility
Loading...
Searching...
No Matches
moon.h
Go to the documentation of this file.
1
8
#pragma once
9
#include <time.h>
10
#include <stdbool.h>
11
#include <stdint.h>
12
17
18
#define MOON_SYNODIC_SEC 2551443
19
#define MOON_EPOCH_UTC 947182440
20
27
int32_t
moon_age_sec
(time_t utc);
28
36
int
moon_glyph_index
(time_t utc,
int
count);
37
45
int
moon_illumination_pct
(time_t utc);
46
53
const
char
*
moon_phase_name
(time_t utc);
54
64
int
moon_days_to_phase
(time_t utc,
bool
to_full);
65
moon_days_to_phase
int moon_days_to_phase(time_t utc, bool to_full)
How many days until the next full or new moon, rounded to the nearest whole day.
Definition
moon.c:48
moon_phase_name
const char * moon_phase_name(time_t utc)
Short name for the current phase (one of the eight main phases).
Definition
moon.c:74
moon_glyph_index
int moon_glyph_index(time_t utc, int count)
Picks one of count evenly spaced phase icons. It wraps back round at the end.
Definition
moon.c:22
moon_illumination_pct
int moon_illumination_pct(time_t utc)
How lit up the moon looks, from 0 to 100. This is a rough straight-line guess, so it reads 0 at new m...
Definition
moon.c:36
moon_age_sec
int32_t moon_age_sec(time_t utc)
How far into the current moon cycle we are, in seconds.
Definition
moon.c:9
src
c
core
clock
moon.h
Generated by
1.18.0