JSFiddle - React, Tailwind, and code Playground

by ricardohbin

HTML

<div ng-app="Test">
    
    <div ng-controller="MainCtrl">
        
        <input ng-model="inputDate" value="1330093479000" /> <button ng-click="convertDate()">Click to Convert</button>
        {{outputDate}}
    </div>   
</div>

JavaScript

var test = angular.module('Test',[]);

test.controller('MainCtrl', function ($scope, $filter) {
    $scope.inputDate = 1330093479000;
    $scope.convertDate = function () {
        var mydate = $scope.inputDate;
        $scope.outputDate = $filter('date')(new Date(mydate), 'dd/MM/y');
    }    
});