I have been using moment.js to display the comment/reply time in the SharePoint. There seems to be a time Zone issue.
When few items are updated only a couple of seconds or minutes ago, due to timezone issue, the last updated time is shown with the difference in timezone. For example, when commented on an article where the comment must show 'a few seconds ago' while it shows '4 hours ago'
npm install moment
--------------------
var moment = require('moment');
moment().format();
moment().startOf('hour').fromNow();
// an hour ago
see the examples
https://momentjs.com/
http://momentjs.com/docs/#/customization/relative-time-threshold/
Related
I am new to google sheets, but I have this very simple and basic tracking system for my work schedule. I wish to make a formula so it automatically finds the number of hours on nights and weekends column, after a specific time.
So ex. night hours between 9 pm-11 pm Monday - Friday and weekend hours between 2 pm-8 pm on Saturday and Sunday.
Check if you get the expected hours (sorry for the layout a bit different!)
https://docs.google.com/spreadsheets/d/1YuY_8XgMUsPtBPJlBgxDFgz8JKB3lCmn2e6vVEutvBY/edit?usp=sharing
test if we =WEEKDAY(A4,2)>5
day on monday-friday =if(D4,, max(0,min(21/24,C4)-B4))
night on monday-friday =if(D4, ,max(0,C4-max(21/24,B4)))
I am new to jql and puzzled on how to write jql query for this .
I want to get all open issues on start of N'th week in past and no of all issues closed by end of that week.
e.g . 3rd week in past , my week start day is monday morning and ends at sunday night. i want to get no of open issues on beginning monday morning , and no of all issues closed on end of the day sunday for that week
You can use the WAS operator with an ON constraint like the following:
status was open on "2020-01-01"
Instead of a fixed date you can also use the JQL functions startOfWeek() and endOfWeek, but be carefull start of week and end of week may depend on the configured locale.
In my application I need a 24 hour clock scheduler. Month is irrelevant, Day is irrelevant also but saving objects as datetime makes it hard to compare things.
"The Morning Take" runs from 5:30am till 11am EST
"Afternoon News" runs 11am till 5pm
"Tonight" runs from 5pm till 10pm
"Wrap up" runs 10pm till 5:30am
I'd like to be able to say
FeatureScheduler.get_current_feature
=> "Tonight" if its say 6:30PM
Running into issues getting it 'right' input as a datetime always wants a day and month and year... but I really only care about scheduling around a 24 hour clock... the day messes things up when I try to see if Time.now is between 5:30am and 11am for example.
Any suggestions for a scheduler that only cares about a 24 hour clock... doesn't use day, month and year in comparisons?
Might be an elegant way to do this, but here's my take anyhow.
require 'time'
class FeatureScheduler
def self.get_current_feature
case Time.now.strftime('%R')
when '05:30'...'11:00'
'The Morning Take'
when '11:00'...'17:00'
'Afternoon News'
when '17:00'...'22:00'
'Tonight'
else
'Wrap Up'
end
end
end
FeatureScheduler.get_current_feature
#=> "Wrap Up"
This is ramesh,
I tried to build my .net application using jenkins, my source is reside at in github. I can get build, when using manual build option in jenkins. But auto build is not working, when i give commit on github.
Thanks
Your question is not clear. What are you Build triggers?
Here's what I use:
Jenkins uses something called corn expressions
MINUTES Minutes in one hour (0-59)
HOURS Hours in one day (0-23)
DAYMONTH Day in a month (1-31)
MONTH Month in a year (1-12)
DAYWEEK Day of the week (0-7) where 0 and 7 are Sunday
* */23 * * * == one day
I've set up a Jenkins job and set the poll interval at 1 minute (I used this syntax 0 * * * *).
Looking in the Polling log I can see its reported that a poll call was made as soon as I saved the changes to the job.
But not over 10 minutes later it hasn't made any other polls.
Any suggestions how I can proceed determining the problem?
You're looking for "* * * * *".
Jenkins gives a warning since every minute can be a bit excessive, but your version control server shouldn't have any problems handling the load.
Your cron syntax is set to poll once per hour, at zero minutes past the hour. From the Jenkins help text:
This field follows the syntax of cron (with minor differences). Specifically, each line consists of 5 fields separated by TAB or whitespace:
MINUTE HOUR DOM MONTH DOW
MINUTE Minutes within the hour (0-59)
HOUR The hour of the day (0-23)
DOM The day of the month (1-31)
MONTH The month (1-12)
DOW The day of the week (0-7) where 0 and 7 are Sunday.