Related Articles
DATEPICKER
1. npm install ng2-datepicker –save 2. import in app.module.tsimport { NgDatepickerModule } from ‘ng2-datepicker’;imports: [NgDatepickerModule] 3. import nelow in component.tsimport { DatepickerOptions } from ‘ng2-datepicker’;import * as frLocale from ‘date-fns/locale/fr’; 4. Before constructore add below code:date:any=new Date(Date.now());options: DatepickerOptions = {minYear: 1970,maxYear: 2030,displayFormat: ‘MMM D[,] YYYY’,barTitleFormat: ‘MMMM YYYY’,dayNamesFormat: ‘dd’,firstCalendarDay: 0, // 0 – Sunday, 1 – […]
DIFFERENCE BETWEEN TWO DATES
$date_a = new DateTime(‘2010-10-20 08:10:00’); $date_b = new DateTime(‘2008-12-13 10:42:00’); $interval = date_diff($date_a,$date_b); echo $interval->format(‘%h:%i:%s’);
HTTPCODE
<?phpnamespace App\Http;class HttpCode{/** HTTP Status Codes & their meaning* Source: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes* By: Yentel Hollebeke – https://github.com/yentel* TODO: add remaining comments with code descriptions*//** Informational codes (1xx)*//*** 100 – Continue* The server has received the request headers and the client should proceed to send the request body* (in the case of a request for which a body needs […]


