-
Notifications
You must be signed in to change notification settings - Fork 4
Information Sources
Jacob Wong edited this page Oct 26, 2019
·
33 revisions
[TBD]
- Basically, the Date object is a [redacted] to use so they made it better.
- For documentation purposes, the main reason for choosing the Java 8 Date/Time API is it's Ease of use and Ease of Understanding over the previous Date object.
Examples of Use:
LocalDate localDate = LocalDate.now();
LocalDate.of(2015, 02, 20);
LocalDate.parse("2015-02-20");
LocalDate tomorrow = LocalDate.now().plusDays(1);
localDateTime.minusHours(2);
DayOfWeek sunday = LocalDate.parse("2016-06-12").getDayOfWeek();
boolean leapYear = LocalDate.now().isLeapYear();
localDateTime.format(DateTimeFormatter.ofPattern("yyyy/MM/dd"));
String localDateString = localDateTime.format(DateTimeFormatter.ISO_DATE);Steps to connect to Firestore and query the tables:
- Add the following line of code as an attribute for the class:
Also need to add import statement for Firestore
FirebaseFirestore db = FirebaseFirestore.getInstance();
import com.google.firebase.firestore.FirebaseFirestore;
- (Optional) If we are referencing the same collection can add the following:
final CollectionReference collectionReference = db.collection(collectionName);
Mohammad's Ridebook
- Firebase Firestore
- Emoji Set