var x = moment("13900229","YYYYMMDD",'fa').format("YYYY/MM/DD");
or
var x = moment("13900229").format("YYYY/MM/DD");
output : Invalid Date
but:
var x = moment("13900228","YYYYMMDD",'fa').format("YYYY/MM/DD");
or
var x = moment("13900228").format("YYYY/MM/DD");
Output:1390/02/03
you can use this code :
moment(date, 'jYYYYjMMjDD').format("jYYYY/jMM/jDD").toString();
the problem is solved