I\'m new to Firebase and I was wondering how I can store a JavaScript date and use Firebase to compare them on the client side later?
I want to do something like:
You need to set a Firebase with string or object with value, and than read the same value in the event.
var someDate = new Date();
myRootRef.set({Date: someDate.toString()});
myRootRef.on('value', function(snapshot) {
var msg = snapshot.val();
var currDate = new Date();
if (currDate >= msg.Date){
//do something
}
});