by soo-doh-kohd | v1.0.9
This plugin is a collection of utilities for iOS and Android to simplify your NativeScript apps.
npm i --save nativescript-sdk-utility
  • Version: 1.0.9
  • GitHub:
  • Downloads:
    • Last Day:   0
    • Last Week:  0
    • Last Month: 0

NativeScript SDK Utility

This plugin provides device specific functions that simplify your NativeScript apps.

  • getVersion(): Returns the current version of your app.
  • getBuild(): Returns the current build of your app.
  • is24HFormat(): Returns a boolean value that indicates if the device is using a 24H time format.
  • formatDateTime(date?: Date, pattern?: string, locale?: string): Returns a date based on given pattern.


tns plugin add nativescript-sdk-utility


var utility = require('nativescript-sdk-utility');

var sdk = new utility.SDKUtility();

var version = sdk.getVersion();
var build = sdk.getBuild();
var is24H = sdk.is24HFormat();
var datetime = this.sdk.formatDateTime(new Date(), "MM/dd/yyyy h:mm");

import { SDKUtility } from 'nativescript-sdk-utility';

export class MyModel {
    public version: string;
    public build: string;
    public is24H: boolean;

    private sdk: SDKUtility;

    constructor() {

        this.sdk = new SDKUtility();
        this.version = this.sdk.getVersion(); = this.sdk.getBuild();
        this.is24H = this.sdk.is24HFormat();
        this.datetime = this.sdk.formatDateTime(new Date(), "MM/dd/yyyy h:mm");


Apache License Version 2.0, January 2004