MCPcopy Index your code
hub / github.com/ccxt/ccxt / yymmdd

Method yymmdd

java/lib/src/main/java/io/github/ccxt/base/Time.java:210–223  ·  view source on GitHub ↗
(Object ts, Object infix)

Source from the content-addressed store, hash-verified

208 }
209
210 public static String yymmdd(Object ts, Object infix) {
211 String sep = (infix == null) ? "-" : String.valueOf(infix);
212 if (ts == null) return null;
213 try {
214 long ms = Long.parseLong(String.valueOf(ts));
215 Instant inst = Instant.ofEpochMilli(ms);
216 DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yy" + sep + "MM" + sep + "dd")
217 .withZone(ZoneOffset.UTC);
218 return fmt.format(inst);
219 } catch (Exception ignored) {
220 // match the C# version which swallows and returns empty string on failure
221 return "";
222 }
223 }
224
225 public static String yymmdd(Object ts) {
226 return yymmdd(ts, "");

Callers 15

yymmddMethod · 0.95
parseMarketMethod · 0.45
fetchOpenInterestMethod · 0.45
parseContractMarketMethod · 0.45
parseMarketMethod · 0.45
parseMarketMethod · 0.45
parseMarketMethod · 0.45
parseMarketMethod · 0.45
fetchContractMarketsMethod · 0.45
parseContractMarketMethod · 0.45
fetchOptionMarketsMethod · 0.45
fetchMarketsMethod · 0.45

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected