Skip to content

Commit

Permalink
version update
Browse files Browse the repository at this point in the history
  • Loading branch information
MenoData committed Dec 18, 2017
1 parent c723c11 commit a5dc9dc
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## [v3.38-2017?] not yet released
## [v3.39-2017?] not yet released

## [v3.38-2017c] published on 2017-12-18
### Added
- Moon rise/set [#704]
- Calculation for azimuth/elevation of Sun and Moon [#723]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Only two steps are required before coding against the API of Time4A.

```groovy
dependencies {
compile group: 'net.time4j', name: 'time4j-android', version: '3.37-2017c'
compile group: 'net.time4j', name: 'time4j-android', version: '3.38-2017c'
}
```

Expand Down
31 changes: 26 additions & 5 deletions app/src/main/java/de/menodata/timedemoapp/TimeDemoApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import net.time4j.calendar.HijriCalendar;
import net.time4j.calendar.JapaneseCalendar;
import net.time4j.calendar.PersianCalendar;
import net.time4j.calendar.astro.LunarTime;
import net.time4j.calendar.astro.SolarTime;
import net.time4j.calendar.frenchrev.FrenchRepublicanCalendar;
import net.time4j.engine.CalendarDays;
import net.time4j.engine.StartOfDay;
Expand All @@ -27,6 +29,7 @@
import net.time4j.format.TextWidth;
import net.time4j.format.expert.ChronoFormatter;
import net.time4j.format.expert.PatternType;
import net.time4j.tz.TZID;
import net.time4j.tz.Timezone;
import net.time4j.tz.olson.EUROPE;

Expand Down Expand Up @@ -97,6 +100,20 @@ static String getTimeInfo(Context context) {
HebrewCalendar.axis());

Moment moment = SystemClock.currentMoment();
TZID hhZone = Timezone.of("Europe/Berlin").getID();
PlainDate today = moment.toZonalTimestamp(hhZone).getCalendarDate();
SolarTime.Sunshine hhSun =
SolarTime.ofLocation()
.northernLatitude(53, 33, 0)
.easternLongitude(10, 0, 0)
.build()
.sunshine(hhZone).apply(today);
LunarTime.Moonlight hhMoon =
LunarTime.ofLocation(hhZone)
.northernLatitude(53, 33, 0)
.easternLongitude(10, 0, 0)
.build()
.on(today);

return "\n\n\n\n"
+ "=> Current time (UTC): " + moment.toString()
Expand All @@ -119,18 +136,22 @@ static String getTimeInfo(Context context) {
+ "\n"
+ "\n=> Example for Austrian timestamp: "
+ ChronoFormatter.ofMomentPattern(
"d. MMMM uuuu GGGG h:mm BBBB z",
PatternType.CLDR,
new Locale("de", "AT"),
EUROPE.BERLIN
)
"d. MMMM uuuu GGGG h:mm BBBB z",
PatternType.CLDR,
new Locale("de", "AT"),
EUROPE.BERLIN
)
.withAlternativeEraNames()
.format(PlainTimestamp.of(2015, 1, 27, 14, 15).inStdTimezone())
+ "\n"
+ "\n=> Current German time (full style): " + germanTime
+ "\n"
+ "\n=> TZDB-version: " + Timezone.getVersion("TZDB")
+ "\n=> ZONE-PROVIDERS: " + Timezone.getProviderInfo()
+ "\n=> sunrise (HH): " + hhSun.startLocal()
+ "\n=> sunset (HH): " + hhSun.endLocal()
+ "\n=> moonrise (HH): " + hhMoon.moonriseLocal()
+ "\n=> moonset (HH): " + hhMoon.moonsetLocal()
+ "\n"
+ "\n=> Duration=" + formattedDuration
+ "\n"
Expand Down
2 changes: 1 addition & 1 deletion time4j-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
siteUrl = 'https://github.com/menodata/Time4A'
gitUrl = 'https://github.com/menodata/Time4A.git'

libraryVersion = '3.37-2017c'
libraryVersion = '3.38-2017c'

developerId = 'mhochschild'
developerName = 'Meno Hochschild'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ public class ApplicationStarter {

//~ Statische Felder/Initialisierungen --------------------------------

private static final String VERSION = "v3.37-2017c";
private static final String VERSION = "v3.38-2017c";
private static final int RELEASE_YEAR = 2017;
private static final int RELEASE_MONTH = 11;
private static final int RELEASE_DAY = 26;
private static final int RELEASE_MONTH = 12;
private static final int RELEASE_DAY = 18;
private static final String TIME4A = "time4a";

private static final AtomicBoolean PREPARED = new AtomicBoolean(false);
Expand Down

0 comments on commit a5dc9dc

Please sign in to comment.