Gets a publishing date
@param string $baseName The base name; 'PublishFrom' or 'PublishTo'
@return Date Returns the date
327703
private function PublishDate($baseName)
    {
        if (!$this->Content()->GetPublish()) {
            return null;
        }
        $strDate = $this->Value($baseName . 'Date');
        if (!$strDate) {
            return null;
        }
        $date = \DateTime::createFromFormat($this->dateFormat, $strDate);
        $date->setTime((int) $this->Value($baseName . 'Hour'), (int) $this->Value($baseName . 'Minute'), 0);
        return Date::FromDateTime($date);
    }
525873
public function setPublicationDate($publicationDate)
    {
        self::writeFullTag(
            $publicationDate,
            'publication_date',
            true,
            'video:publication_date',
            $this->validator,
            'validatePublicationDate',
            $this->exception,
            'Provided publication date value is not a valid.'
        );

        return $this;
    }
633636
public function getPublishedDateString($format = \DateTime::ISO8601)
    {
        $date = $this->getPublishedDate();

        if (empty($date)) {
            return null;
        }

        return $date->format($format);
    }
327158
public static function buildRepositoryPath(
        string $basename,
        string $domain,
        string $language
    ) : string {
        return sprintf('%s/%s.%s.yml',
            $basename,
            $domain,
            $language
        );
    }
488676
public function baseName($baseName = null)
    {
        if ($baseName !== null) {
            $this->baseName = rtrim($baseName, '/') . '/';
        }

        return $this->baseName;
    }
895313
protected String computeProjectName(String rootPath, Date date) {

        // create the temporary project, which is deleted after publishing
        // the publish scheduled date in project name
        String dateTime = CmsDateUtil.getDateTime(date, DateFormat.SHORT, getLocale());
        // the resource name to publish scheduled
        String projectName = key(Messages.GUI_PUBLISH_SCHEDULED_PROJECT_NAME_2, new Object[] {rootPath, dateTime});
        // the HTML encoding for slashes is necessary because of the slashes in english date time format
        // in project names slahes are not allowed, because these are separators for organizaional units
        projectName = projectName.replace("/", "&#47;");
        return projectName;
    }
1340655
public Date getDate(String fieldName) throws DbfException {
        Date value = (Date) get(fieldName);
        return value == null ? null : value;
    }
192871
protected function buildDateTimebyString($stringDate, $base = null)
    {
        if (is_null($base)) {
            $base = time();
        }

        try {
            $base = $base instanceof \DateTimeInterface ? $base->format('U') : strtotime((MathUtility::canBeInterpretedAsInteger($base) ? '@' : '') . $base);
            $dateTimestamp = strtotime((MathUtility::canBeInterpretedAsInteger($date) ? '@' : '') . $date, $base);
            $date = new \DateTime('@' . $dateTimestamp);
            $date->setTimezone(new \DateTimeZone(date_default_timezone_get()));
        } catch (\Exception $exception) {
            throw new Exception('"' . $date . '" could not be parsed by \DateTime constructor: ' . $exception->getMessage(), 1241722579);
        }
    }
1269052
public static function generateImageName($baseName)
    {
        $fileName = hash('crc32', $baseName . time());
        if (file_exists(Yii::getAlias('@frontend/web/images/shop/' . $fileName . '-original.jpg'))) {
            return static::generateImageName($baseName);
        }
        return $fileName;
    }
848853
private String generateOutputFileBase(String baseDir, String fileNameHeader,
            String fileNameBody, DateFormat dateFormat, long targetDate)
    {
        StringBuilder baseFileNameBuilder = new StringBuilder();

        baseFileNameBuilder.append(baseDir).append(fileNameHeader).append(fileNameBody);
        baseFileNameBuilder.append(dateFormat.format(new Date(targetDate)));
        String result = baseFileNameBuilder.toString();

        return result;
    }
1020287
public function getProjectDates( $projectName = "" )
	{
		$dates	= array();
		foreach( $this->projects as $project )
		{
			if( $projectName && $projectName != $project['name'] )
				continue;
			$dates[]	= array(
				'name'	=> $project['name'],
				'start'	=> $project['start'],
				'end'	=> $project['end'],
			);
		}
		return $dates;
	}
1359229
public function createForService($serviceName) {
		if ($this->_basePath === null) {
			throw new ConfigError('Base path was not given');
		}
		
		$filename = $this->_filenameTemplate;
		
		if (strpos($filename, self::PATTERN_SERVICE) !== false) {
			$filename = str_replace(self::PATTERN_SERVICE, $serviceName, $filename);
		}
		
		if (strpos($filename, self::PATTERN_DATE) !== false) {
			$filename = str_replace(self::PATTERN_DATE, date($this->_dateFormat), $filename);
		}
		
		$path = $this->_basePath;
		
		if ($this->_separateDirs) {
			$path .= DIRECTORY_SEPARATOR . $serviceName;
			
			if ((! file_exists($path) || ! is_dir($path)) && ! mkdir($path)) {
				throw new NoDirectory('Directory does not exists and unable to create: "' . $path . '"');
			}
		}
		
		$path .= DIRECTORY_SEPARATOR . $filename;
		
		if (isset($this->_loggers[$serviceName])) {
			return $this->_loggers[$serviceName];
		}
		
		$adapter = $this->getCreateCallback()->__invoke($path);
		$logger  = new Logger($adapter);
		
		$this->_loggers[$serviceName] = $logger;
		return $logger;
	}
8916
protected function _getBaseString($baseField, $data) {
        $type = $baseField['type'];
        $method = '_getBaseStringFrom' . ucfirst($type);
        return $this->{$method}($data, $baseField);
    }
769295
public function getPublishedAt($format = null, $timezone = null)
    {
        return $this->getDisplayDateTime($this->published_at, $format, $timezone);
    }
238135
function getBasename()
    {
        $filename  = $this->getFilename();
        $extension = $this->getExtension();

        return ($extension === '' || $extension === null)
            ? $filename
            : $filename.'.'.$extension;
    }
356541
private function getLastFileUpdate($filename)
        {
                $feed_url = sprintf(self::FEED_BASE_URL, $filename);

                $content = $this->fetchUrl($feed_url);
                if (preg_match("/<pubDate>([^<]+)<\/pubDate>/", $content, $match)) {
                        return date("d.m.Y H:i", strtotime($match[1]));
                } else {
                        return false;
                }
        }
1309257
def get_absolute_url_with_date(self):
        """"""
        pub_date = self.published_on

        if pub_date and settings.USE_TZ:
            # If TZ is enabled, convert all of these dates from UTC to whatever
            # the project's timezone is set as. Ideally, we'd pull this form
            # some user settings, but the *canonical* publish time is that of
            # the author (asssuming author == owner of this project).
            pub_date = make_naive(pub_date, pytz.utc)  # Make naive
            pub_date = pytz.timezone(settings.TIME_ZONE).localize(pub_date)
        if pub_date:
            args = [
                pub_date.strftime("%Y"),
                pub_date.strftime("%m"),
                pub_date.strftime("%d"),
                self.slug
            ]
        else:
            args = [self.slug]
        return reverse('blargg:entry_detail', args=args)