1--TEST--
2Cloning datefmt icu <= 4.2
3--SKIPIF--
4<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5<?php if(version_compare(INTL_ICU_VERSION, '4.3', '<') != 1) print 'skip'; ?>
6--FILE--
7<?php
8include_once( 'ut_common.inc' );
9$GLOBALS['oo-mode'] = true;
10$res_str = '';
11/*
12 * Clone
13 */
14$start_pattern = 'dd-MM-YY';
15$fmt = ut_datefmt_create( "en-US",  IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/New_York', IntlDateFormatter::GREGORIAN , $start_pattern );
16
17$formatted = ut_datefmt_format($fmt,0);
18$res_str .= "\nResult of formatting timestamp=0 is :  \n$formatted";
19
20$fmt_clone = clone $fmt;
21ut_datefmt_set_pattern( $fmt , 'yyyy-DDD.hh:mm:ss z' );
22
23$formatted = ut_datefmt_format($fmt,0);
24$res_str .= "\nResult of formatting timestamp=0 is :  \n$formatted";
25$formatted = ut_datefmt_format($fmt_clone,0);
26$res_str .= "\nResult of clone formatting timestamp=0 is :  \n$formatted";
27
28echo $res_str;
29
30?>
31--EXPECT--
32Result of formatting timestamp=0 is :
3331-12-69
34Result of formatting timestamp=0 is :
351969-365.07:00:00 EST
36Result of clone formatting timestamp=0 is :
3731-12-69
38