I need to configure Statsig flag to return true for 30 days, by setting from and to dates
I am using "check time and date" and I am trying to set before and after time. But its giving invalid error. Not sure what is the mistake. Please guide to resolve this issue
Statsig uses American formats for dates - so MM/DD/YYYY, and XX:XX AM/PM
I think the UI should have a datepicker which enforces this. Here's what mine looks like
Related
I am fairly new to AngularJS and am having an issue with formatting the time object to populate my "time" input field in Android and Firefox. I have spent hours trying to figure out the issue and also utilized AngularJS's documentation to try and figure this out, but have had no luck.
I am dynamically populating an input field from JSON, and the result is always in the following format: 14:57:00.000
I need it to look like this in the input field: 2:57 PM
Here is the link to AngularJS that I have been referring to: AngularJS time input. At the bottom of the page is the plunker to run.
Thank you in advance for any assistance you can provide me.
you can use something like this
{{myTime | date: 'shortTime'}}
It seems to insist on making you choose a time also. I went through the read me several times and I'm not seeing how to only do a date.
https://github.com/dalelotts/angular-bootstrap-datetimepicker
You need to set minView to day in the config datetimepicker-config="{'minView':'day'}". It restricts selection till that level. So, by making it day, we won't let it select further days. Like this:
<datetimepicker ng-model="date" datetimepicker-config="{'minView':'day'}" />
That should do it!
It might be a super simple solution, but I am struglling with it for a while now.
I am using angular.js and using input time.
The server returns the following date convention:
shiftStarted = "2017-01-17 19:55:11"
I want to put it as ng-model in the input field:
<input type="time" ng-model="shiftStarted" />
The problem is that input time should receive a valid JS date format,
In order to try to solve it I used this solution I found on the web:
shiftStarted = new Date(shiftStarted.replace(' ', 'T'));
But the following is changing the timezone to UTC.
How can I simply put the date accurately in the input time field without handling tough timezone issues?
Best,
Omri
If your date has been formatted as YYYY-MM-DD, the browser will parse it as an ISO date. (the full format would be 2017-01-17T18:03:26+00:00 at the time of me writing this)
Since no timezone portion was provided (only a date), the browser assumes the timezone is UTC by default.
If you just want to parse a date without bothering with timezones, you could use MomentJS (as suggested by Ananth)
Code would be:
shiftStarted = moment(shiftStarted, "YYYY-MM-DD").toDate();
There is the angular-date directive:
<input type="text" datetime="yyyy-MM-dd HH:mm:ss" ng-model="shiftStarted">
This also include a parser service. New timezone additions too.
https://github.com/eight04/angular-datetime
You could try date.getTimezoneOffset()
I am working on a news blog mobile app using wordpress WP-API, everything else is working ok, but am having problem formatting the wordpress post date
this {{post.date}} gives me something like2016-08-07T15:45:26
How ever I want to format the date to have something like dd-mm-year, then in another one I get the time, instead of 15:45:26, I want to get something like 3:45 pm.
If possible, I will also like a filter that returns the date 2016-08-07T15:45:26 to something like 24 hours ago, 2 days ago, 1 week ago etc
Thanks
Had the same problem too. You may want to check this
:https://weblog.west-wind.com/posts/2014/jan/06/javascript-json-date-parsing-and-real-dates
You could use a date manipulation library to convert the datetime provided by WordPress to the desired format. You may want to check out Moment.js.
I would like to set date to default time zone. At this moment my date looks like this: 2013-04-08T22:00:00 +02:00. I need to set my date to +00:00.
I tried to get the offset of my date and I received -120. Is it possible to set time offset? Are there maybe any better solutions?
Anybody an idea?
I'm using EXT JS.
JavaScript's Date object is bound to the time zone of the computer itself. There is no way to change the zone offset programmatically to an arbitrary value.
There is some work going on to add this functionality to the Moment.js library, but it is still in progress.
If you are just looking to get the time at UTC in ISO format, you can use .toISOString()
If you are speaking about code that is specific to the Ext.Date object from ExtJS, please edit your question and post some sample code so we can get a better idea of what you are talking about. Thanks.