http://wikitravel.org/en/Urdu_phrasebook#Calendar_.28.D8.AA.D9.82.D9.88.DB.8C.D9.85.29
http://wikitravel.org/en/Urdu_phrasebook#Time_and_Dates
http://languagephrases.com/urdu/telling-time-in-urdu-language/
solution for the password/confirm password matching:
matchingPasswords(passwordKey: string, passwordConfirmationKey: string) {
return (group: FormGroup) => {
let passwordInput = group.controls[passwordKey];
let passwordConfirmationInput = group.controls[passwordConfirmationKey];
if (passwordInput.value !== passwordConfirmationInput.value) {
return passwordConfirmationInput.setErrors({passwordMismatch: true});
}
function getCurrentTime() {
var date = new Date();
return (date.getTime() - date.getMilliseconds()) / 1000;
}
source: http://www.esqsoft.com/javascript_examples/date-to-epoch.htm
This will take filePath
as a function parameter and reads the file via fs
module and get the file and converts it's size into more humanly readable format.
const fs = require('fs');
function getFileSize(filename) {
const stats = fs.statSync(filename);
//console.log('stats', stats);
const {size} = stats;
[angular-cli](https://github.com/angular/angular-cli) installation & upgrade instructions (commands): | |
# Install (i.e., as a first time?) | |
``` | |
$ npm install -g @angular/cli@latest | |
``` | |
# Upgrade to Latest Release | |
``` | |
$ npm uninstall -g angular-cli @angular/cli |
If you haven't already installed npm, or you'd like the latest version: | |
Check: | |
``` | |
$ node --version | |
$ npm --version | |
``` | |
If both node and npm are not installed then I would recommend you to Install via setup (manually). [Download the latest setup from NodeJS website](https://nodejs.org/en/download/) |
/* | |
// Here is format of data passed to function.. | |
var sampleData = [ '/Users/narain/Sites/todos-task/.DS_Store', | |
'/Users/narain/Sites/todos-task/.ftppass', | |
'/Users/narain/Sites/todos-task/.gitignore', | |
'/Users/narain/Sites/todos-task/Gruntfile.js', | |
'/Users/narain/Sites/todos-task/LICENSE', | |
'/Users/narain/Sites/todos-task/README.md', | |
'/Users/narain/Sites/todos-task/css/.DS_Store', | |
'/Users/narain/Sites/todos-task/css/normalize.css', |