JSFiddle - React, Tailwind, and code Playground

JavaScript

var day = parseInt("08.01.2008".split('.')[0])
alert(day);