# File lib/git-version-bump.rb, line 81
        def self.date(use_local_git=false)
                if use_local_git
                        unless git_available?
                                raise RuntimeError,
                                      "GVB.date(use_local_git=true), but git is not installed"
                        end

                        sq_git_dir = shell_quoted_string(Dir.pwd)
                else
                        sq_git_dir = shell_quoted_string((File.dirname(caller_file) rescue nil || Dir.pwd))
                end

                # Are we in a git tree?
                system("git -C #{sq_git_dir} status > #{DEVNULL} 2>&1")
                if $? == 0
                        # Yes, we're in git.

                        if dirty_tree?
                                return Time.now.strftime("%F")
                        else
                                # Clean tree.  Date of last commit is needed.
                                return `git -C #{sq_git_dir} show --no-show-signature --format=format:%cd --date=short`.lines.first.strip
                        end
                else
                        if use_local_git
                                raise RuntimeError,
                                      "GVB.date(use_local_git=true) called from non-git location"
                        end

                        # Not in git; time to hit the gemspecs
                        if spec = caller_gemspec
                                return spec.date.strftime("%F")
                        end

                        raise RuntimeError,
                              "GVB.date called from mysterious, non-gem location."
                end
        end