Skip to main content
100%

Gist 6b09d2803971ebce538a0eb91375b9b0

✓ Published0🌍 Public
HHsuHsiaoHsuan
Last edited Aug 23, 2022
Created on Aug 23, 2022

This example shows a utility function for determining whether two timestamp values fall on the same calendar day. It compares both the day-of-year and the year extracted from each timestamp, using the `Calendar` class from the Android or Java standard library. The function converts each `Long` timestamp into a `Calendar` instance via `getInstance()` and `timeInMillis`, then checks the `DAY_OF_YEAR` and `YEAR` fields. The code relies entirely on `Calendar` APIs and does not involve any visualization or external data source.

AI-generated description

Similar vizzes