For a friend who needed to know how to check if two dates in Sybase ASE 12 are a year apart.
Add moment.js lib
// TODO: Validate if date diff is no more than 1 year
var startSepDt = moment($('#startDateSep').val());
var endSepDt = moment($('#sendDateSep').val());
var dateDiff = endSepDt.diff(startSepDt, 'year');
if (dateDiff > 1)
showInValidSeasrchWarning('The date range cannot exceed a year.');
A SQL Solution
-- DATEDIFF two dates 1 year apart
DECLARE @year1 datetime, @year2 datetime
SET @year1 = DATEADD(year,-1,GetDate())
SET @year2 = GetDate()
SELeCT @year1, @year2, datediff(year,@year1,@year2)
if( datediff(year,@year1,@year2) <= 1 AND datediff(dd,@year1, @year2) <= 365 )
print 'Hurray! Within one year..'
print ':( Difference is more than a year'
The CLI moved into a separate package: webpack-cli.
Please install ‘webpack-cli’ in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D
(Make sure you deleted the bundle.js file to ensure your task runner is executing correctly)
If you configure the TASK RUNNER EXPLORER and you do NOT get your files in the DIST FOLDER…
Make sure that Visual Studio is using the global installed version of npm not it’s local.
In VS 2017 TOOLS | OPTIONS
In filter box type: External Web Tools
Move $(PATH) to the top of the list in the Locations of External tool
npm install jquery –save
Adding JQuery typings
Install d3 via npm then typings
npm install –save d3
npm install –save @types/d3