Class ExchangeTimeZone


  • public class ExchangeTimeZone
    extends java.lang.Object
    Author:
    Stijn Strickx
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Map<java.lang.String,​java.util.TimeZone> INDEX_TIMEZONES  
      static java.util.Map<java.lang.String,​java.util.TimeZone> SUFFIX_TIMEZONES  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.TimeZone get​(java.lang.String suffix)
      Get the time zone for a specific exchange suffix
      static java.util.TimeZone getStockTimeZone​(java.lang.String symbol)
      Get the time zone for a specific stock or index.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SUFFIX_TIMEZONES

        public static final java.util.Map<java.lang.String,​java.util.TimeZone> SUFFIX_TIMEZONES
      • INDEX_TIMEZONES

        public static final java.util.Map<java.lang.String,​java.util.TimeZone> INDEX_TIMEZONES
    • Constructor Detail

      • ExchangeTimeZone

        public ExchangeTimeZone()
    • Method Detail

      • get

        public static java.util.TimeZone get​(java.lang.String suffix)
        Get the time zone for a specific exchange suffix
        Parameters:
        suffix - suffix for the exchange in YahooFinance
        Returns:
        time zone of the exchange
      • getStockTimeZone

        public static java.util.TimeZone getStockTimeZone​(java.lang.String symbol)
        Get the time zone for a specific stock or index. For stocks, the exchange suffix is extracted from the stock symbol to retrieve the time zone.
        Parameters:
        symbol - stock symbol in YahooFinance
        Returns:
        time zone of the exchange on which this stock is traded